How to use Meta Viewport in XML?

纵然是瞬间 提交于 2019-12-05 20:49:26
Startec

Given this answer (which is specifically about closing the <meta> tag) I think the simplest thing to do here would be to just close the meta element with /> as browsers will not complain.

Paul Sweatte

Use the XHTML namespace:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta name="viewport" content="width=320, initial-scale=1"/>
</head>
<body>
    <!-- Insert your content here -->
</body>
</html>

OR:

<html:meta xmlns:html="http://www.w3.org/1999/xhtml" name="viewport" content="width=320, initial-scale=1"/>

References

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!