Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Document types

edited December 2006 in Vanilla 1.0 Help
This is another HTML question, not a Vanilla one, but you guys were so helpful last time ....

I was referred to the CCS Play site by someone on this forum, and it has proved very stimulating in helping me develop menus. But of course I run into the inevitable "IE is not standards compliant" problem.

Stu Nichols says one of the problems is document type, and offers a whole lot of alternatives on this page.

Does anyone out there have any advice on this please? It DTD as important as he says? What DTD do you use? Thanks.


  • Options
    Yes, DTD is important. A DTD tells a page which compliance mode to render in. Without it the page defautls to "tag soup" mode which is very unpredictable, and definitely NOT the same from browser to browser. Giving a page type (specifically to IE) will get it to render in standards compliance mode which causes, say, different/standard padding/margin on different elements etc.

    You can find information about this in all kinds of blog posts around, just bust out the google's and start searching.
  • Options
    Thanks chuyskywalker & Max, I read the link (and also the W3C page), but I think I'm a bit too far behind the pace to really get hold of it. I would have thought there were some very clearly best ways to go, but there seems to be very many options, and I find it difficult to work them all out.

    I wonder if either of you or some other kind person could answer these questions please, to give me a little bit more info to work from:

    1. Is the most important thing to actually have a DTD, regardless of what it is, or is the choice critical also?
    2. Which of the many DTDs on the W3C site do most people use, and why?
    3. Is it normal and best to submit every page for validation?

    Thanks again.
  • Options
    1. More important to have one. As long as you stick to the standard for that DTD you're fine.
    2. I have no idea. I tend to stick to XHTML Strict, but HTML Strict (4.0) is just fine as well since it's a very long standing format and can still do just about everything you need.
    3. "Normal and best"? Tedious, I'd say. You can try -- but realize this, for the most part you are the only one who really cares. Almost no one comes to you page and says "does this validate?" The question is always "Did I find what I need?", which is predicated upon "Does this site render right?". Validation is a step I take when I want to make sure my code is up to snuff in case I'm facing annoying rendering problems.
  • Options
    Sorry to be slow, but I'm still struggling with this one. A couple more questions if you can bear with me please.

    4. If you changed the DTD, would you have to change the code? What sorts of things would have to change?
    5. If you use a WYSIWYG text editor (I use Nvu on a Mac, but do some manual coding as well), will this pre-determine the document type?

    Thanks again.
  • Options
    4. yes, closing tags, identifiers space name, many things in fact
    5. yes, most of editor have a menu option to coose from
This discussion has been closed.