| 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).
Значення за умовчанням
за умовчанням атрибут вимкнений.
Застосовується до наступних HTML тегів
<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>
Приклад
HTML5 IE 9 IE 10 + Cr Op Sa Fx
<!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>
