Meaning of HTML prefix attribute (Open Graph Protocol)?

前端 未结 2 1931
礼貌的吻别
礼貌的吻别 2020-12-13 06:18

I\'m new to Facebook Open Graph Protocol. I have been trying to figure out what the meaning of the HTML prefix attribute is. The closest post on Stack Overflow

2条回答
  •  眼角桃花
    2020-12-13 06:31

    It appears the prefix attribute is indeed defined in the RDFa specification you linked. While you need to specify the correct media type for XHTML documents (application/xhtml+xml) and the correct doctype () and probably some more XML push-ups, this isn't necessary for HTML5. In HTML5 you can use the RDFa-defined attributes out-of-the-box.

    See: HTML+RDFa 1.1 specification

    I don't know if there are any specific advantages of this way of mapping a prefix to a namespace. It isn't entirely clear to me either.

提交回复
热议问题