Back to list
Views:   3.5K
Replies:  0

What is the purpose of the 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">

<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>

Is this a valid HTML construct?  
If so, what is it used for?  From the examples it seems to have a semantic meaning. 


Sean Healy, Aug 10, 2013
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.