How is Value determined for an Anchor Tag with Microdata?

前端 未结 2 1180
逝去的感伤
逝去的感伤 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: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.

提交回复
热议问题