1 reply [Last post]
EviL PoptarT
Offline
newbie
Last seen: 17 years 13 weeks ago
Joined: 2005-04-05
Posts: 3
Points: 0

I am curious as to why sites use either doctype? more specifically I wonder what effects does this render over each other in a viewport .. even though sites for instance have no xml contained in them?

Tags:
Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 26 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Xml vs Html doctypes

Essentially either will render your page correctly given well formed code. Even though most sites using the XHTML doctype are not using xml the doctype still renders html it's a sort of transitional point between the two standards it's better to use the XHTML flavour as it imposes certain syntax conditions on the markup that are required by XML and prompts us to code in a disciplined way and prepares us for full use of the xml standard.

Hugo.

This thread moved to the 'Off Topic' forum

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me