HTML减肥 精简HTML标记制作网页

2020-04-17 08:30:20易采站长站整理

HTML 4

HTML (非XHTML),MIME type 为 text/html ,允许省略一些标签。通过 HTML 4 DTD,你可以省略以下标签(那些所谓可避免的元素,这里用删除线加以标记)

</area>

</base>

<body>

</body>

</br>

</col>

</colgroup>

</dd>

</dt>

<head>

</head>

</hr>

<html>

</html>

</img>

</input>

</li>

</link>

</meta>

</option>

</p>

</param>

<tbody>

</tbody>

</td>

</tfoot>

</th>

</thead>

</tr>

比如,你的代码是

<li>List item</li>

可以写为

<li>List item

又比如段落要以

</p>

结尾,你可以只写

<p>My paragraph