Use of profile attribute in HTML head tag

后端 未结 4 1933
走了就别回头了
走了就别回头了 2020-12-14 06:58

What is the use of profile attributes in the HTML tag?

I happened to read about it in here : http://www.w3schools.com/tags/tag_head.asp.

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-14 07:20

    HTML5 has dropped the profile attribute from the head element (details).
    You could however, use a rel attribute to the links to achieve this.

    So, instead of

        
    

    it is now

        
    

    From W3,

    The profile attribute of the HEAD specifies the location of a meta data profile. The value of the profile attribute is a URI. User agents may use this URI in two ways:

    1. As a globally unique name. User agents may be able to recognize the name (without actually retrieving the profile) and perform some activity based on known conventions for that profile. For instance, search engines could provide an interface for searching through catalogs of HTML documents, where these documents all use the same profile for representing catalog entries.
    2. As a link. User agents may dereference the URI and perform some activity based on the actual definitions within the profile (e.g., authorize the usage of the profile within the current HTML document). This specification does not define formats for profiles.

    Simply put, XMDP introduced a simple way to define URLs and meanings used in an element, to read and write by both humans and machines as a dictionary of meta information. It was an initial attempt to achieve relations between elements.

    To read more on this, find the references listed at the end of the answer.

    IMO, things have really improved in the recent past to achieve semantic relations thanks to introduction and implementations of Rich Snippets, which allows multiple formats for implementing structured data.
    More information is available at schema.org and FAQ.

    Here is the list of supported markup formats

    1. Microdata
    2. Microformats
    3. RDFa

    ... More Details

    With recent updates, there is also linking of author, and content published (Google+ only), by adding this :

    
    

    References / Further reading :

    1. http://www.w3.org/TR/html401/struct/global.html#profiles
    2. http://gmpg.org/xmdp/
    3. http://microformats.org/wiki/html5-profile#Section_7.4.1_-_The_HEAD_element
    4. http://microformats.org/wiki/profile-uris
    5. http://support.google.com/webmasters/bin/answer.py?hl=en&answer=99170&topic=1088472&ctx=topic

提交回复
热议问题