W3C validation questions

B

Bruce W...1

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:
http://gpsdata.keystandard.com/valid.php
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.
 
S

Steve Pugh

Bruce W...1 said:
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:
http://gpsdata.keystandard.com/valid.php
Click on any link to go to a page without the doctype tag. Can anyone
explain this?

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

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.

Steve
 
D

David Dorward

Bruce said:
Putting the doctype tag at the top of my page changes the layout of my
tables. Go here for an example:
http://gpsdata.keystandard.com/valid.php
Click on any link to go to a page without the doctype tag. Can anyone
explain this?

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
Doctype.

See also: said:
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?

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

[1] not tag, attribute.
 
B

Beauregard T. Shagnasty

Quoth the raven named Bruce W...1:
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:
http://gpsdata.keystandard.com/valid.php 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?

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.

<http://groups.google.com/[email protected]&rnum=3>
 
E

Eric B. Bednarz

Bruce W...1 said:
Putting the doctype tag

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.
at the top of my page changes the layout of my tables.

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

Bruce W...1

Eric B. Bednarz said:
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.


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

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?

Thanks.
 

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

Similar Threads

Validation crisis 12
W3C Validation 23
W3C validation error 11
Unhelpful HTML validation 2
HTML Aligning social media icons 2
Help with my responsive home page 2
W3c Problems 3
Help with Visual Lightbox: Scripts 2

Members online

No members online now.

Forum statistics

Threads
473,792
Messages
2,569,639
Members
45,353
Latest member
RogerDoger

Latest Threads

Top