Internet Explorer | Chrome | Opera | Safari | Firefox | Android | iOS |
11.0+ | 5.0+ | 11.5+ | 4.0+ |
HTML: | 3.2 | 4.01 | 5.0 | XHTML: | 1.0 | 1.1 |
Скрывает содержимое элемента от просмотра. Такой элемент не отображается на странице, но доступен через скрипты (см. пример).
<E hidden>
В качестве значения можно указать hidden (hidden=»hidden») или оставить атрибут пустым (hidden=»» или hidden).
По умолчанию атрибут выключен.
<a>, <abbr>, <address>, <area>, <b>, <bdo>, <big>, <blockquote>, <body>, <button>, <caption>, <cite>, <code>, <col>, <colgroup>, <dd>, <del>, <dfn>, <div>, <dl>, <dt>, <em>, <embed>, <fieldset>, <form>, <h1>, <h2>, <h3>, <h4>, <h5>, <h6>, <i>, <iframe>, <img>, <input>, <ins>, <kbd>, <label>, <legend>, <li>, <map>, <menu>, <ol>, <option>, <p>, <pre>, <q>, <s>, <samp>, <select>, <span>, <strong>, <sub>, <sup>, <table>, <tbody>, <td>, <textarea>, <tfoot>, <th>, <thead>, <tr>, <ul>, <var>
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>hidden</title> <style> #link { cursor: pointer; color: blue; text-decoration: underline; } </style> <script> function showForm() { document.getElementById("auth").hidden = false; document.getElementById("link").hidden = true; } </script> </head> <body> <p id="link" onclick="showForm()">Авторизация на сайте</p> <form id="auth" hidden> <p><label>Логин: <input name="user" required></label></p> <p><label>Пароль: <input name="pass" type="password" required></label></p> <p><input type="submit" value="Войти"></p> </form> </body> </html>
Сайт