Link to home
Start Free TrialLog in
Avatar of vanauden
vanaudenFlag for Canada

asked on

doctype - why is it important - what happens if you use the wrong doctype

HTML doctype - Require answers for all questions please:

why is it important?

what happens if you use the wrong doctype?

If I have a page with frames in it, and I use this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

instead of this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

what is going to happen? (please elaborate)

thanks!
SOLUTION
Avatar of bruno
bruno
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vanauden

ASKER

Hi Brunobear

I read both articles and now have a better understanding of doctype, but I still do not have a specific undertanding of what would happen if

I have a page with frames in it, and I use this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

instead of this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

Will the browser go into quirks mode?
I have not tested this - but I would assume it would confuse the browser because the doctype specifies what the browser should expect in the document.  The normal HTML 4 doctype tells teh browser that it should expect certain things - body tags, etc.  your frameset won't have them.  i would have to test to see if it goes into quirks mode.....
does anyone else have an idea of what would happen? Would it ultimately matter?

The reason I need an answer, is that I have a huge site I am modifying, and I would like to avoid a global replace if possible.

ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thank you both

I appreciate your help!

Glad we could help.  Thanks for the A. :^)

Cd&