为什么此代码 <center> any thing</center> 在 HTML5 中正确呈现,尽管其中 <center> 标记不可用?
why this code <center> any thing</center> is rendered correctly in HTML5 though the <center> tag is not available in it?
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<center> any text </center>
</body>
</html>
我认为内容不会呈现在页面中央,因为它不是 html5 的一部分,因为它已被弃用,但事实并非如此。为什么在我使用的所有浏览器中都会出现这种情况。
也许浏览器仍然支持 HTML4 并且 <center>
标签在 HTML4 中用于居中文本。
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<center> any text </center>
</body>
</html>
我认为内容不会呈现在页面中央,因为它不是 html5 的一部分,因为它已被弃用,但事实并非如此。为什么在我使用的所有浏览器中都会出现这种情况。
也许浏览器仍然支持 HTML4 并且 <center>
标签在 HTML4 中用于居中文本。