Re: doctype nightmare

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Murray (forums_at_HAHAgreat-web-sights.com)
Date: 11/04/04


Date: Wed, 3 Nov 2004 19:51:51 -0500

You don't need to declare any doctype.

Pages with no doctype, or with an incomplete doctype will be rendered by the
browser's quirks mode. This is not good since each browser has a different
interpretation of 'quirks'. Therefore you may see quite a bit of variation
from one browser/platform combination to another, depending on the quality
of your code and the methods you have used.

Pages with a complete doctype will be rendered by the browsers in the mode
specified in the doctype, either loose, or strict, or XHTML. In most cases
the former two would be all you would need. One probably shouldn't use
XHTML unless one has a need to do so.

In loose or strict rendering mode, browsers (mostly) adhere to published
standards in interpreting the code on the page. Notwithstanding this ideal,
there is still variation between browsers and platforms, but not nearly as
much as in quirks mode. If you are a good code, use strict. If you are not
a good coder, use loose, or none.

When would it make a difference? Here's an example.

<table width="100%" height="100%"...

This is a commonly used method of filling the page with a table's contents
(or vertically centering contents on the page). However, table height is
NOT valid HTML. It never has been.

In quirks mode, browsers will take a shot at rendering 100% high tables
(what is it 100% of: the body of the page, or the browser's viewport
height?) - but IEMac and IEPC have different interpretations. In standards
mode, since this code is invalid HTML, it is ignored completely. A 100%
high table will only be as tall as the contents require in any browser on
any platform.

Geddit?

-- 
Murray
<anonymous@discussions.microsoft.com> wrote in message 
news:18fc01c4c1ff$38f702f0$a501280a@phx.gbl...
>i have reviewed discussions here about doc type been to
> w3.org. and spider web woman and am becoming more
> confused by the minute.  If you have created a site in
> fp2003 and include javascript and have css what doc type
> should you declare?  i entered trans loose html 4.0 but
> got an error with w.3 saying this page is not valid html
> 4.0 transitional.
>
> also can anyone tell me what xlmns is???
>
> thank a million to anyone who replies.  Its past my bed
> time and i await useful replies 


Relevant Pages

  • Re: doctype nightmare
    ... >>You don't need to declare any doctype. ... >>In loose or strict rendering mode, browsers ... >>much as in quirks mode. ... >>NOT valid HTML. ...
    (microsoft.public.frontpage.client)
  • Re: doctype nightmare
    ... >You don't need to declare any doctype. ... >In loose or strict rendering mode, browsers ... >much as in quirks mode. ... >NOT valid HTML. ...
    (microsoft.public.frontpage.client)
  • Re: "Frames" Question
    ... the main problem here is lack of a DOCTYPE. ... written for early browsers. ... Opera has no quirks mode, ... Great book BTW! ...
    (sci.electronics.design)
  • Re: CSS Menu Width in Firefox
    ... http://www.vunet.us/wic/test/ (compare Firefox and IE) ... Your lack of a DOCTYPE throws browsers into quirks mode. ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: tables it is
    ... You are running the browsers in quirks mode, ... merely the serendipitous side effect of a known set of bugs. ... have told the browsers that is how it *should* look. ... To be sued for intellectual theft I would have had to have stolen something ...
    (alt.html)