htmlschema.orgmicrodatarich-snippets

schemas.org : SiteNavigationElement name on attribute title not text


I would like to add the name base on the attribute title as there is no text displayed for the link but instead a icon using font-awesome

My link are like this :

<a itemprop="url" href="whatever.html">
  <i class="fa fa-home" title="Home"></i>
</a>

I need solution without javascript involve


Solution

  • Like this:

    <a itemprop="url" href="whatever.html">
      <i class="fa fa-home" title="Home"></i>
      <meta itemprop="name" content="Whatever Name You Want" />
    </a>
    

    (Note edited to remove incorrect alternative after below discussion).

    Though as an aside, as per below conversaation, some question on whether <i> tag should even be used: Should I use <i> tag for icons instead of <span>?