Could one web page have multiple html elements?
Say
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<div>code here</div>
<html><head>...</head><body>...</body开发者_StackOverflow中文版></html>
</body>
</html>
I have tested it in Firefox and it works. Is this right?
Is this right?
No, it is invalid. Firefox is just being lenient and making the best out of what is a broken structure.
If in doubt, run it through the w3c validator:
Line 6, Column 14: document type does not allow element "html" here
精彩评论