开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜