You spoke of how to make a document rendered in XHTML or HTML, so why not just use doc types instead of changing server settings?
Printable View
The doctype is used to tell the browser what version of mark-up to use and is critical when it comes to parsing your website. Doctype is short for DTD which means Document Type Definition, but yeah it's understandable to see where people get confused in thinking that the doctype changes the content type.
When i saw this, i was like "ugh... huge text blocks :("
primarily Sorry for the late reply, the thread got pushed down as for both of yours queries.
The content type currently specifies whether to use HTML or the XML parser in a browser, that is why when you send your XHTML as text/html it's rendered as broken HTML, which is primarily what it bases it's render on. The document type is the version of HTML or XHTML it also stops the browser from triggering quirks mode - and thus puts it into standard mode. Hope that answered your question(s).