Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 274
  • Last Modified:

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!
0
vanauden
Asked:
vanauden
  • 3
  • 2
  • 2
2 Solutions
 
brunoCommented:
there are articles out there you should read before someone hear attempts a blanket answer to all your questions:

http://www.alistapart.com/articles/doctype/
http://hsivonen.iki.fi/doctype/
0
 
vanaudenAuthor Commented:
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?
0
 
brunoCommented:
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.....
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
vanaudenAuthor Commented:
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.

0
 
COBOLdinosaurCommented:
1. It let's the browser know how hte page is intended to be rendered.  Allows the page to be validated, and serves as documentation for whomever has to maintain it.

2. Generally nothing, but you may get unexpected results if you are depending on the browser to render to a given version of the standards

3.  Nothing as far as rendering.  The first is incomplete because it does not contain the url of the dtd; so it is infromational only.  There will be differences in validation.  The validator will not like frames in a page not using the framest DTD.

Cd&
0
 
vanaudenAuthor Commented:
thank you both

I appreciate your help!

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

Cd&
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now