doctype nightmare

G

Guest

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
 
M

Murray

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?
 
B

bumblingalong

thank you very much, i can go to bed now, without
worrying that my web site will not be displayed. Thanks
again. Good night
 
M

Murray

You're welcome. I'm not sure whether this is good or bad news for you,
though! 8)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top