HTML and CSS Reference
In-Depth Information
lang
Specifies the primary language of the element's contents.
spellcheck
Set to true for enabling spell and grammar checking on the element's contents.
style
Inline CSS styling.
tabindex
Determines if media element is focusable, and the element's order is in the tabbing se-
quence.
title
Advisory information, such as a tooltip.
data-*
Custom data type, such as data-myownuse or data-thisappsuse . Used to read and write
custom data values for use in your own applications.
Of course, not all of the global attributes seem relevant with both of the media elements. For
instance, I can't see how it is possible to spell or grammar check the contents of a video. Oth-
ers, though, are very useful.
If you need to access a specific audio or video element using JavaScript, you'll need to set
its id attribute. You can capture an entire set of media elements in a page, and pinpoint the
specific one you want by its page position, but it's easier just to use id .
If you have more than one media element on possibly different web pages, and you want to
provide the same CSS styling for each, you'll need to assign a class for each, and then use
the class name in your CSS stylesheet.
Being able to drag and drop media elements is a viable web action, so the draggable and
dropzone attributes are useful. So are the accesskey and tabindex attributes if you want
finer control over the element's keyboard access.
The hidden attribute may not seem as viable at first. However, you could use it to remove an
audio or video element from rendering, while still ensuring access to the contents for purposes
that don't depend on immediate reader access.
Search WWH ::




Custom Search