On the PC version web page (http://pc_url), add:
<link rel=alternate media=only screen and(max-width: 640px) href=http://pc_url >
On the mobile page (http://mobile_url), the required annotation should be:
<link rel=canonical href=http://mobile_url >
The previous Meta tag (mobile agent) will continue to be used, but we recommend that mobile pages made in HTMAL5 language use the latest solution for jump adaptation. Others, such as xml language mobile page jump adaptation, need to continue to use the previous meta tag. Way:
<meta name=mobile-agentcontent=format=[wml|xhtml|html5]; url=mobile_url>
The new mobile adaptation in HTML5 is written as above. This is mainly for search engines such as Baidu to crawl the mobile URL of the website. It does not automatically jump when the device is switched to a mobile phone. To achieve automatic jump, js is also required. .
SummarizeThe above is the perfect way to write HTML5 for mobile terminal adaptation introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for your support of the VeVb martial arts website!