I want to output two HTML documents, wrapped inside of an HTML document
Is it possible to do something like this with HTML?
<html>
<head></head>
<body>
<frameset>
<frame>
<html>
<head></head>
<body>First page here</body>
</html>
</frame>
<frame>
<html>
<head></head>
<body>Second page here</body>
</html>
</frame>
</body>
</html>
It doesn’t have to be frames, but I only want to hit the server once, so linking to a document with src attribute is out, it has to be inline.
Not possible. Neither
iframenorframeis inline. The best for your scenario would be to extract thebodytag content, and insert it into adiv. CSS would be a problem, though – there’d have to be some processing on it so it would be restricted to just half the page. Something like this:CSS transformation:
body->#page1(or#page2),#id->#id, anything elseX->#page1 X.Using
iframes is definitely easier; and if the server is well-configured, it probably doesn’t even require a separate connection.BTW: Your suggestion will probably render, but AFAIK it’s non-standard (browsers guessing what you want, instead going by the specification, something browsers have gotten used to having to do); and there’s still the problem of CSS.