次要是体现在代码标准上,XHTML 标准会更加严格
XHTML 元素必须被正确地嵌套
-
正确示范
<b><i>This text is bold and italic</i></b>
-
谬误示范
<b><i>This text is bold and italic</b></i>
XHTML 元素必须被敞开
-
正确示范
<p>This is a paragraph</p> <p>This is another paragraph</p> A break: <br /> A horizontal rule: <hr /> An image: <img src="happy.gif" alt="Happy face" />
-
谬误示范
<p>This is a paragraph <p>This is another paragraph A break: <br> A horizontal rule: <hr> An image: <img src="happy.gif" alt="Happy face">
标签名必须用小写字母
-
正确示范
<body> <p>This is a paragraph</p> </body>
-
谬误示范
<BODY> <P>This is a paragraph</P> </BODY>
XHTML 文档必须领有根元素
-
所有的 XHTML 元素必须被嵌套于 根元素中
<html> <head> ... </head> <body> ... </body> </html>
文章的内容 / 灵感都从下方内容中借鉴
- 【继续保护 / 更新 500+ 前端面试题 / 笔记】https://github.com/noxussj/In…
- 【大数据可视化图表插件】https://www.npmjs.com/package…
- 【利用 THREE.JS 实现 3D 城市建模(珠海市)】https://3d.noxussj.top/