I know that every single html file has to have exactly ONE <html>...</html> part.
But is it OK to send a sequence of such files all in one http reply?
No browser I've tested so far did ever complain, results look nice.
But do I violate any standards this way?
Haven't found any answers (w3c.org,...) yet.
Yes, you have violated the basic standards of both HTTP and HTML. Browsers will do their best to render whatever data is sent to them, regardless of any violations of various standards. So when you're sending multiple files at once, the browser simply treats it as a single HTML file and renders them all - one after the other.
For simple layouts, you'll probably get reasonably readable results, but sooner or later this practice will cause problems for you. You need to find a way to assemble everything into a single, valid HTML file.
An alternative to building one file would be to make them PHP include files. This is particularly useful for repetitive information that you want to appear on multiple web pages. That way when the info changes, you only have to amend it once and all the pages are updated.
(What I, forum-newbie, would like to "do right next time" is to reply to
a specific post instead of writing beneath the whole thread.)
The story is just the other way round:
For quite a while I was working with a concatenation of originally stand-alone html-snippets and was happy to see everything in one place.
Then one day I looked at the source...
But, just for the sake of curiosity---as promised, I won't do it in public:
After all, isn't what we call a html-document perfectly encapsulated by
And once the http is done (CRLF,CRLF), isn't it OK to send whatever you
have announced as "content-type:" as many times as you like?
Does anyone know an authoritative source for further reading?
My every-search-engine-I-know-foo seems to be very very weak...