Welcome to WebmasterWorld Guest from 126.96.36.199 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Pubcon Platinum Sponsor 2014
Doctype? What should I use, HTML or XHTML and which version and why? johnblack Sorry if this has been asked a thousand times before but which version of XHTML or HTML should I use in my DOCTYPE statement and why?
Most of the sites I work with have static HTML pages, so what should I do?
Is it just enough that they render correctly, why should I worry about this?
Any feedback greatly accepted
If you are new to this, and just writing static HTML pages like you said, I would recommend this line, right up top:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Its about the easiest to validate (important!).
You can try tougher stuff later on. -Larry johnblack
Thanks for that. That's sort of what I was thinking (HTML 4.01).
Would I be correct in thinking the only reason to go to XHTML 1.0 would be if I was considering using XSLT?
Sorry, I one of those people where a little knowledge is a dangerous thing! :O)
I toyed with XHTML a bit. I got in too deep too soon, and there was no real need. Eventually I will probably have to go there, I'm in no rush now. -Larry kiwibrit
Don't forget this threaed [ webmasterworld.com]. johnblack
Thanks for that guys.
The thread and article were very interesting. I can remember buying my first HTML book many moons ago, which spouted that XHTML was the way to go. But here I am still knocking out HTML code, totally ignoring XHTML (for the moment).
So from a validation point of view I should stick to HTML 4.01 to get my web pages squeaky clean?
BTW kiwibrit, I guess you could call me britkiwi, 5 years in the land of the long white cloud since leaving the motherland