Click to See Complete Forum and Search --> : Some DTD questions...


Ness_du_Frat
06-03-2005, 05:26 PM
Hello everybody !!!
Until now, I was using the doctype : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
I see more and more that it's better to use the strict xhtml version.
Can somebody tell me a bit more about it ? ( I read the w3c description of the DTD ) I'd mainly like to know why it's so bad to use the other one.
Moreover, I see that you cannot have <base target=_whatever> defined in the document.
I also read something frightening about some css things not working with xhtml 1.0 strict.
So, I was wondering. Will it be an improvement for my website if I use the xhtml strict DTD, or should I stick to html 4.01 trans ?
Thanks !

Charles
06-03-2005, 05:56 PM
There's no good reason to use XHTML for web pages, and several good reasons not to. But those have been discussed elsewhere. But you should take a closer look at the 4.01 transitional DTD: This is the HTML 4.01 Transitional DTD, which includes
presentation attributes and elements that W3C expects to phase out
as support for style sheets matures. Authors should use the Strict
DTD when possible, but may use the Transitional DTD when support
for presentation attribute and elements is required.Use HTML 4.01 Strict.

Stephen Philbin
06-04-2005, 02:15 AM
Aye. As Charles said, there's no point using XHTML yet (other than purposes of learning to use it.). Lot's of people use it in live pages and sites just for "kudos", but I find the notion to be quite ridiculous. They seem to think that sticking a foward slash in empty elements makes them an XHTML author and that it is in some way better to be an XHTML author than an HTML author. On top of that, to make their efforts all the more worthless, almost every single XHTML authored page or site is served as text/html anyway, which is just ridiculous.

Ness_du_Frat
06-04-2005, 03:38 AM
Ok, thanks ! Then, I'll just go for the HTML strict. I didn't care that much about the XHTML, and even more when I saw some css would not work... ;)

LiLcRaZyFuZzY
06-04-2005, 05:05 AM
even more when I saw some css would not work... ;)
what do you mean?

Charles
06-04-2005, 05:14 AM
Anything in the document's prolog other than the DTD will send MSIE out of standards mode - and there are things that you might want to add to the prolog of an XHTML document.

Ness_du_Frat
06-04-2005, 07:39 AM
what do you mean?
On the W3C standard page about xhtml 1.0, they said some specific css properties would not work with xhtml. They didn't say which, but I don't want to take the chance.
I'll go for html 4.01 strict. :)