Computer >> Computer tutorials >  >> Programming >> Javascript

What is the correct use of schema.org SiteNavigationElement in HTML?


The schema.org SiteNavigationElement extends WebPageElement. It is used to mark-up links that would make amazing contextual links.

<nav role = "navigation" itemscope itemtype = "https://schema.org/SiteNavigationElement">
<ul>
   <li>
      <a href = "https://example.com/" title = "Link to home page" itemprop = "url">
         <span itemprop="name">Home page</span>
      </a>
   </li>
   <li>
      <a href = "https://examplecom/demo" title="Link to demo page" itemprop = "url">
         <span itemprop = "name">My demo page</span>
      </a>
   </li>
</ul>