PDA

View Full Version : doctype. What & Why?


Corrosive
08-18-2008, 06:35 PM
Hi all

Clue is in the title. What doctype does everyone start with an why?

Cheers

Cary
08-19-2008, 03:23 AM
I use html 4.01 because xhtml pages served as html are just mangled html pages and there's no advantage gained. Correctly served xhtml pages aren't supported by IE.

I use strict because I'm starting from scratch, so I know there's no deprecated code.

domedia
08-19-2008, 01:27 PM
Cary is my brother from a different mother.
I do exactly the same for the same reasons.

Corrosive
08-19-2008, 03:50 PM
Cary is my brother from a different mother.
I do exactly the same for the same reasons.

OK, will swap one of mine over and validate. See how I get on. Also what is the full doctype for HTML 4.0 Strict? Some seem to have links to W3 in and some don't.

domedia
08-19-2008, 04:32 PM
Here ya ago:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

Corrosive
08-19-2008, 04:35 PM
Here ya ago:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

Thanks Ove. Am going to try it now...see if my code is up to it.

Rob_Che
08-19-2008, 09:05 PM
Ooh me too !
Wish me luck !

domedia
08-19-2008, 09:23 PM
ok, you both know how to reach me :)

Corrosive
08-20-2008, 06:02 AM
ok, you both know how to reach me :)

Spotless, not an error or warning in sight. Kim and Aggie would have nothing to do if they came round my code (that's probably a very British joke). You Rob?

Rob_Che
08-20-2008, 11:04 AM
I ran doncastermusiccollective.co.uk through the validator which has

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

it came back clean - it had some warnings but I cleaned these too.
I think that makes it valid under strict but I will check.

Then I ran blog.wireroses.co.uk through the mangle and it came back clean too... it's a Wordpress blog and carries this doctype:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


How'd I do ?

Rob_Che
08-20-2008, 11:05 AM
I'll try it with the code above (from Domedia) and run it through...
I'm sure it's fine though !:roll:

domedia
08-20-2008, 01:11 PM
They will most likely render a little different. And remember that xhtml and html tags are written differently.

Rob_Che
08-21-2008, 07:33 PM
cool... I'm good at strict level too...
You taught us well master.

Corrosive
08-22-2008, 06:12 AM
cool... I'm good at strict level too...
You taught us well master.

Well done Rob and, yes, thanks Ove. You are a patient teacher :)