How can a page tell browsers that an AMP HTML version exists?

前端 未结 1 1154
执笔经年
执笔经年 2021-01-18 00:24

I understand I will have two pages, the AMP one and the regular one. The AMP one has a canonical link to the regular one, but how does the regular one specify that there is

相关标签:
1条回答
  • 2021-01-18 00:34

    The AMP document discovery documentation specifies that you need to add this tag in the <head>:

    <link rel="amphtml" href="...">
    

    As an example, if you take a look at a page from a publisher that already supports AMP, such as http://www.bbc.co.uk/news/world-europe-34471849, you can see this tag in the <head>:

    <link rel="amphtml" href="http://www.bbc.co.uk/news/amp/34471849">
    
    0 讨论(0)
提交回复
热议问题