HTML Validation nightmare!

E

Edd Grant

I have just begun to validate my code against the transitional dtd:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1-transitional.dtd">

So far I have only attempted to validate the index page (index.cfm)
and I have managed to resolve all but 1 errors.

The error which I simply cannot figure out how to resolve is as
follows:

Line 223, column 30: there is no attribute "alt"

<a href="/index.cfm" alt="Home"><b>home</b></a>

I have checked the code and can confirm that the link does contain an
alt tag which is the same as all the other alt tags on the page (which
are not throwing validation errors)

Incase anyone has a minute to check it, the page is at:

http://www.mredd.co.uk/index.cfm

(The site may load slowly as it is hosted on my home ADSL connection -
so our upload (256k) tends to get a bit smacked about when all my
housemates are downloading stuff!! - Thanks for your patience if this
occurs!)

If anyone knows what is causing this problem I would be seriously
grateful to hear from you!!

Cheers,

Edd
 
M

Mark Parnell

Previously in alt.html said:
Line 223, column 30: there is no attribute "alt"

<a href="/index.cfm" alt="Home"><b>home</b></a>

So remove the attribute "alt" as it isn't valid.
I have checked the code and can confirm that the link does contain an
alt tag

*Attribute*. It is an alt *attribute*.
which is the same as all the other alt tags on the page (which
are not throwing validation errors)

They aren't on anchors though, are they?
 
B

Barbara de Zoete

I have just begun to validate my code against the transitional dtd:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1-transitional.dtd">

Why would you code XHTML and then make it transitional? BTW: if I click to
that DTD, it's not there.
Line 223, column 30: there is no attribute "alt"

<a href="/index.cfm" alt="Home"><b>home</b></a>

Don't know about XHTML, but in HTML the anchor element doesn't allow href
as attribute.
 
K

Karl Core

Edd Grant said:
I have just begun to validate my code against the transitional dtd:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1-transitional.dtd">

So far I have only attempted to validate the index page (index.cfm)
and I have managed to resolve all but 1 errors.

The error which I simply cannot figure out how to resolve is as
follows:

Line 223, column 30: there is no attribute "alt"

<a href="/index.cfm" alt="Home"><b>home</b></a>

I have checked the code and can confirm that the link does contain an
alt tag which is the same as all the other alt tags on the page (which
are not throwing validation errors)

weird. the HTML spec says nothing about the alt attribute for anchors -
http://www.w3.org/TR/html401/struct/objects.html#adef-alt
 
M

Mark Parnell

They aren't on anchors though, are they?

Looking at the page, it seems that they are. I can only assume then that
the validator is picking it up on the first one, then ignoring the
others as it is the same error. Remove it from the first link, and the
validator will complain about the second, and so on.
 
M

Michael Winter

[snip]
The error which I simply cannot figure out how to resolve is as follows:

Line 223, column 30: there is no attribute "alt"

<a href="/index.cfm" alt="Home"><b>home</b></a>

The answer is simple: remove the alt attribute. A elements do not have
one. If you're trying to display a tooltip (which alt should *never* do),
use the title attribute.
I have checked the code and can confirm that the link does contain an
alt tag which is the same as all the other alt tags on the page (which
are not throwing validation errors)

The validator simply gave up on the first one. If you delete the alt
attribute on the first link, the second will error, and so on.
Incase anyone has a minute to check it, the page is at:

http://www.mredd.co.uk/index.cfm

A couple of comments:

1) Why is there so much white-space in the file?
2) Those links near the start of the document should be marked-up
with a list.
3) Aside from the rather unnecessary FONT element, I don't see why
this document shouldn't be Strict, rather than Transitional.

[snip]

Hope that helps,
Mike
 
R

rf

Edd said:
I have just begun to validate my code against the transitional dtd:

Why not use strict? That is better these days.
Line 223, column 30: there is no attribute "alt"

<a href="/index.cfm" alt="Home"><b>home</b></a>
I have checked the code and can confirm that the link does contain an
alt tag

It's an alt *attribute*, not an alt tag.

The error message means exactly what it says. There is no alt attribute
specified for the anchor element. That means you are not allowed to use one.

The alt attribute is meant to be a textual replacement for an image element
(and a couple of others) when the browser can not display the image.

You are not thinking of the title attribute are you? Title is what you
should use if you want "tooltips" displayed. Displaying alt text as tooltips
began as an error in an early internet explorer and has stuck ever since.
which is the same as all the other alt tags on the page (which
are not throwing validation errors)

Not yet. They will when you fix the first one. The validator has already
told you about your error. It is merely being brief.

Nice try hiding the source. Had me fooled for several milliseconds :)
 
H

Henry

Edd said:
I have just begun to validate my code against the transitional dtd:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1-transitional.dtd">

So far I have only attempted to validate the index page (index.cfm)
and I have managed to resolve all but 1 errors.

The error which I simply cannot figure out how to resolve is as
follows:

Line 223, column 30: there is no attribute "alt"

<a href="/index.cfm" alt="Home"><b>home</b></a>

I have checked the code and can confirm that the link does contain an
alt tag which is the same as all the other alt tags on the page (which
are not throwing validation errors)

Incase anyone has a minute to check it, the page is at:

http://www.mredd.co.uk/index.cfm

(The site may load slowly as it is hosted on my home ADSL connection -
so our upload (256k) tends to get a bit smacked about when all my
housemates are downloading stuff!! - Thanks for your patience if this
occurs!)

If anyone knows what is causing this problem I would be seriously
grateful to hear from you!!

Cheers,

Edd


One of the ugliest music pages I have seen for while.
It shows that you and an art are... far apart!

And who cares how you have designed your web page, tables, css or frames.

Whoever will come to your page, will be interested who you are and
what's yer tits are - meaning - show me da musica.

You think ANYONE will care if your page does validate, or will change
the browser and screen resolution to please... you?

Or anyone will appreciate or even have a slightest idea what that
yellow/white W3C/css stuff means?

Some may actually click on it, expecting that's your label!

;-O


BTW. You are working for W3C or you are trying to promote your music!?

Also you've wrote Contact me: http://www.mredd.co.uk

No logic here...
 
B

Big Bill

Looking at the page, it seems that they are. I can only assume then that
the validator is picking it up on the first one, then ignoring the
others as it is the same error. Remove it from the first link, and the
validator will complain about the second, and so on.

Pretty damn useless validator then, ain't it? Probably only works for
people who already understand validation. If the OP does a search for
the cse html validator, he'll find a free one that actually explains
why something is wrong.
Now wait to see who says "It's not a validator! It's a linter!"

BB
 
J

Jukka K. Korpela

Big Bill said:
Pretty damn useless validator then, ain't it?

That feature was added on user request.
Probably only works
for people who already understand validation

Quite astonishing, isn't it?
If the OP does a
search for the cse html validator, he'll find a free one that
actually explains why something is wrong.

For some values of "explain" and "wrong". The latter is defined as
'whatever does not please the author of the phoney validator'.
Now wait to see who says "It's not a validator! It's a linter!"

You sound like the author of the phoney "validator" who shows up at
irregular intervals to defend it, admits ultimately that it is not a
validator (though insisting on saying this obscurely), and keeps
selling it as one.
 
B

Big Bill

That feature was added on user request.


Quite astonishing, isn't it?


For some values of "explain" and "wrong". The latter is defined as
'whatever does not please the author of the phoney validator'.


You sound like the author of the phoney "validator" who shows up at
irregular intervals to defend it, admits ultimately that it is not a
validator (though insisting on saying this obscurely), and keeps
selling it as one.

I think I know who you mean. No, that isn't me.

BB
 

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


Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top