Saturday, 10 August 2013

Role attribute in HTML?

Role attribute in HTML?

Lately I have seen several instances where a role attribute is included in
the HTML. These are some examples:
<header class="navbar navbar-fixed-top" role="banner">
</header>
and
<ul class="dropdown-menu" role="menu">
<li><a href="/">Home</a></li>
<li><a href="/products">Products</a></li>
<li><a href="/services">Services</a></li>
</ul>
Is this a valid HTML construct?
If so, what is it used for? From the examples it seems to have a semantic
meaning.
Thanks.

No comments:

Post a Comment