开发者

Can XHTML nest more XHTML?

It's legal to nest SVG documents inside XHTML documents; but is it legal to nest XHTML documents inside other XHTML documents in the same fashion?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Sup</title>
</head>
<body>
    <h1>Hello World!</h1>
    <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
            <title>Nested document</title>
        </head>
        <body>
            <p>This is a sample</p>
        </body>
    </html>
&l开发者_StackOverflowt;/body>
</html>


No, the html element is only allowed as root element of the document.


You can, using <iframe> (though not recommended and should be avoided).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜