
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?It was in context of parsing / rendering XHTML sorry if you got confused by this I'll be sure to use 'parse' for future reference. It wouldn't designed for people who are new to web development as already stated, more so the advance and I made a basic one for people who wanted to know as posted above. As for doctypes everyone (I'd presume) uses doctypes so there is really no need to mention it, hardly relevent on why you should use HTML over XHTML.
How could this hapen to meeeeeeeeeeeeeee?lol.
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"
What the hell are you talking about, browsers don't render xhtml based on content type alone, they render it based on content type or the doctype.Basic Overview to the HUGE HTML or XHTML Article
Due to a number of people saying that the article is way to long which I agree to an extent - if you really want to learn you've got to put the effort into it. Anyhow this is pretty much the main reason why you should use HTML over XHTML although on the original it states it's up to you - which it is.
Content type
Everything has a content type, GIF images have “image/gif”, Javascript is “text/javascript” and CSS is “text/css”, so why should HTML and XHTML be any different? Well they’re not, HTML has text/html and XHTML is “application/xhtml+xml”
XHTML sent as HTML
Well if you’ve got an XHTML website it’s likely to be sent as HTML this is due to the server configuration, and by default “.php” files are also sent as text/html. So this means your XHTML will be rendered as broken HTML because the browser will simply see “<br />” as an error and correct it to “<br>”
XHTML sent as XHTML
So your site is being sent as the proper content type, application/xhtml+xml but this will cause Internet Explorer (all versions) to give you a dialogue so either way you either choose a) lose XHTML features by having it rendered as HTML or b) make all internet users unable to view your website
Conclusion
There are various other reasons why you should not use XHTML at the present time, but as stated the main reason is the content type, Internet Explorer doesn’t support it, lots of people use Internet Explorer. Why use XHTML if it’s being rendered as HTML and you lose all the features of XHTML, there’s no point so instead use HTML 4.01 Strict which is more familiar with browsers and search engines over XHTML 1.0 or XHMTL 1.1.
visit my internet web site on the internet
http://dong.engineer/
it is just videos by bill wurtz videos you have been warned
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).
Last edited by Iszak; 11-11-2008 at 03:35 PM.
Want to hide these adverts? Register an account for free!