W3C validation questions

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I've been trying to validate my html here:
    http://validator.w3.org /
I have two questions.

Putting the doctype tag at the top of my page changes the layout of my
tables.  Go here for an example:
Click on any link to go to a page without the doctype tag.  Can anyone
explain this?

Also, the page uses a number of images just for layout purposes.  I'm
not sure why these images should have an alt tag but the validator says
so.  What should the alt tag say for such images be, an empty pair of
quotes maybe?

Thanks for your help.

Re: W3C validation questions

Quoted text here. Click to load it

In many modern browsers (IE5 Mac, IE6 Win, Mozilla, Netscape 6+, Opera
7, etc.) the doctype triggers either different rendering mode.

The doctype you chose to add triggered standards mode (no doctype at
all triggers quirks mode). In standards mode the browser tries to
apply the HTML and CSS standards, whilst in quirks mode the browser
tries to maintain compatability with less capabale older browsers.

Presumably your layout was written to take advantage of the buggy
display in old browsers and so when you add a doctype that causes the
browser to behave itself it changes your layout. Might be time to
rethink your code.

Quoted text here. Click to load it

Look at the page with no images. What text is needed to give the page
the same meaning and functionality as when images are loaded? That is
the alt text you should add. If the image is purely decorative then
alt="" is the most suitable choice.


"My theories appal you, my heresies outrage you,
 I never answer letters and you don't like my tie."  - The Doctor

Re: W3C validation questions

Bruce W...1 wrote:

Quoted text here. Click to load it

Some browsers use the Doctype (or lack thereof) to try to guess if the
author of the page is trying to code according to the spec, or code tag
soup for generation 4 browsers. They switch rendering mode depending on the

See also: <http://gutfeldt.ch/matthias/articles/doctypeswitch.html

Quoted text here. Click to load it

Generally, images used for layout should be replaced with some CSS. For
those images which are entirely decorative, an empty alt attribute[1] is

[1] not tag, attribute.

David Dorward                                       http://dorward.me.uk /

Re: W3C validation questions

Quoth the raven named Bruce W...1:

Quoted text here. Click to load it

In addition to the other good answers, do note that your page falls
apart in IE when I resize your xx-small text to something I can read.
I think it is because the images do /not/ resize.

Please change to body { font-size: 100%; } and you can of course
remove all the other xx-small lines. They all Cascade from body. If
you remove Verdana, you won't need xx-small.
FONT-FAMILY: Verdana, Helvetica, sans-serif*/;
BTW, the extra comment mark after sans-serif is causing the following
styles to be ignored.


    -This space intentionally left blank.

Re: W3C validation questions

Quoted text here. Click to load it

It's not a tag, it's a markup declaration.  If that doesn't make a
difference for you, chances are that you shouldn't use it at all.

Quoted text here. Click to load it

Your web-wowser is broken; nothing to worry about, most of them are.


Re: W3C validation questions

"Eric B. Bednarz" wrote:
Quoted text here. Click to load it

Thanks guys, that's good information.  And I did a few changes.

But for the declaration
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd ">
where can one find information on how this mode renders tables?


Site Timeline