Welcome to WebmasterWorld Guest from 126.96.36.199 , register , free tools , login , search , subscribe , help , library , announcements , recent posts , open posts Pubcon Website
Doctype? What should I use, HTML or XHTML and which version and why? johnblack msg:566887 10:07 am on Jun 27, 2006 (gmt 0) 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
larryhatch msg:566888 10:10 am on Jun 27, 2006 (gmt 0)
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 msg:566889 10:26 am on Jun 27, 2006 (gmt 0)
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)
larryhatch msg:566890 10:36 am on Jun 27, 2006 (gmt 0)
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 msg:566891 10:41 am on Jun 27, 2006 (gmt 0)
Don't forget this threaed [ webmasterworld.com]. johnblack msg:566892 11:00 am on Jun 27, 2006 (gmt 0)
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