Forum Moderators: mack
The doctype tells the browser which version of HTML you used to created your page. If you do not supply it then the browser must guess (and could get it wrong).
Using a FULL doctype (like the doctypes listed by the w3c [w3.org]) will put the browser in 'Standards Compliant' mode - making it follow the w3c standards more carefully.
Content-Type
Content-Type tells the browser that the page contains html written in the UTF-8 character set (or whatever other character set you enter there).
Selecting a character set means that the browser can correctly render wierd characters without you having to use html entities (e.g. you can just type an acute instead of having to use
á. Both of the tags are required before you can properly validate your html with the w3c validator [validator.w3.org].
A typically excellent response
tell me this, if I were to add the doctype and it didn't quite adhere to the standards would I be somehow penalised?
I know I should to get my pages validated, but not just yet - should I wait until I have done this or add the doctype tag now?
Many Thanks
Kitti
But I suggest that you develop your pages with a doctype in place from the very start. For two reasons:
Validation actually makes page development much easier - honest - think of it as part of the process, as if you are 'compiling' your html.