How is Value determined for an Anchor Tag with Microdata?

前端 未结 2 1181
逝去的感伤
逝去的感伤 2020-12-11 20:06

How do Google and others determine the value of an itemprop on an Anchor tag?

 Name Of Link

        
相关标签:
2条回答
  • 2020-12-11 20:36

    It seems I found the answer not long after posting this. However, rather than deleting the question, I'm sure there are others out there who are wondering the same thing.

    The short answer is: It uses the href attribute.

    The long answer can be found here: http://schema.org/docs/gs.html#advanced_canonical

    0 讨论(0)
  • 2020-12-11 20:55

    The Microdata spec (which is now merely W3C Note) defines:

    If the element is an a, area, or link element
    The value is the absolute URL that results from resolving the value of the element's href attribute relative to the element at the time the attribute is set, or the empty string if there is no such attribute or if resolving it results in an error.

    Exception: when the a/area/link element has an itemscope attribute, then the itemprop "value is the item created by the element", not the href value.

    0 讨论(0)
提交回复
热议问题