HTML5 is pushing itself very fast, every new recommendation comes with new elements, attributes.
Here are some attributes from candidate recommendation, and how to use them.
Let's go to every one individually.
This attribute is related with HTML5
<input> element when
type attribute is of type
"file", i.e., file upload state, and its
accept attribute is specified with any one of valid MIME types.
capture attribute is a boolean attribute, if specified
true, then to capture the media directly from the device of user agent using Media capture mechanism.
The valid parameter will be:
<input type="file" name="video" accept="video/*" capture>
<input type="file" name="image" accept="image/*" capture>
<input type="file" name="audio" accept="audio/*" capture>
capture is invoked, then User Agent should invoke the appropriate media capture mechanism.
capture depends on
accept attribute, now if MIME type of accept have no specific control of media capture mechanism, then
UserAgent will ignore the capture.
From the security point of view, the
UserAgents have to rely on the commands from the end user.
- User will be prompted for any such media access before capturing the content from microphones/cameras.
- User will be prompted to terminate any such request.
- User will be asked to choose among multiple media capture devices (if they exist.).
- User can enable/disable sounds in video capture mode.
While using this
Boolean attribute on a node (
commands, etc.), the
node of DOM will become unavailable for the
UserAgent UA. This means the
useragent will interpret as if it is unavailable for DOM events, even it will escape the text search (commonly know as “Find In Page”), and will block user from selecting text in the node.
The node in
inert cannot be focused, and nodes that are
accesskey, etc.), that will also get disabled.
If Browsing Context (Environment (With
WindowsProxy objects ) in which document objects are presented to user) is marked as
inert, then its Nested Browsing Context (
iframes, etc.) and all
nodes in the document must be marked as
showModal() method makes use of this mechanism.
The modal dialog appears to disable the control behind it for selection, manipulation, text search although they may be visible.
Finally, this attribute had been added to HTML5 proposed attributes. It is specially meant for the browser on the devices with dynamic keyboard, about which type of keyboard to display.
This attributes applies to
<input type ="text"/"search"/"password" ..> and
The value of Inputmode will range from latin, katkana, tel, email, url, etc. The advantage will be switching to the keyboard for typing only numbers, urls, etc.
<input mode="text" inputmode="numeric">
<input mode="text" inputmode="Latin">
This attribute is related to
download attribute if present will indicate the user agent as author has intended the
hyperlink to be used for downloading some resources.
This attribute may(not) have the value, if value is present will specify the default file name specified by the author for local file system.
Suppose for example, an element contains monthly report like:
<a href ="files/monthlyReport/ewqaas23eOct2014.pdf" >Click Me!!</a>
When clicked, it will download the file with the same name “ewqaas23eOct2014.pdf”, that doesn't sound good for the end user.
Now taking the help of
<a href ="files/monthlyReport/october2014.pdf"
when clicked will download the report with name "ReportOctober 2014".
This element enables Hyperlink Auditing, when used on
<a> element, it will ping the URLs entered (each separated by space), when user follows the hyperlink supplied on
<a href ="www.HakkunaMatata.com" Ping="www.noworries.com">Click ME!!</a>
ping attribute, we can enter multiple URLs separated by space.
To provide security features, the UA will provide the full support to user to handle the ping URLs, i.e. by prompting to Allow, or block, or even can disable the ping.