hidden (HTML attribute)

Spec
Depr. Version
Yes N/A

Syntax

hidden="
{ true | false }
"

Description

Using the hidden attribute (set to "true"), it is possible to hide any visual element that may otherwise appear with the embedded content. Typically it may be used for audio content whereby not including the attribute would result in the transport controls (play, pause, etc) being visible underneath the audio.

Example

The hidden attribute set to "true" to hide the transport control on some audio:

<embed src="Crash.wav" hidden="true"></embed>

Value

"true" or "false" only.

Compatibility

Browser support is patchy. Some browsers were effective in hiding the transport controls while others hid the controls but still reserved a large space on the page for invisible content. Best advice is to avoid using this attribute unless you are absolutely sure of the browsers that your audience are using (for example, an Intranet).

User-contributed notes

There are no comments yet.

Add a note

To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

Related Products