HTML Validation nightmare!

Discussion in 'HTML' started by Edd Grant, Dec 16, 2004.

  1. Edd Grant

    Edd Grant Guest

    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
     
    Edd Grant, Dec 16, 2004
    #1
    1. Advertising

  2. Edd Grant

    Mark Parnell Guest

    Previously in alt.html, Edd Grant <> 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?

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Dec 16, 2004
    #2
    1. Advertising

  3. On 16 Dec 2004 15:37:15 -0800, Edd Grant <> wrote:

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

    --
    Weblog | <http://home.wanadoo.nl/b.de.zoete/_private/weblog.html>
    Webontwerp | <http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html>
    Zweefvliegen | <http://home.wanadoo.nl/b.de.zoete/html/vliegen.html>
     
    Barbara de Zoete, Dec 16, 2004
    #3
  4. Edd Grant

    Karl Core Guest

    "Edd Grant" <> wrote in message
    news:...
    >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



    --
    -Karl Core
    Please Support "Project Boneyard":
    http://www.insurgence.net/info.aspx?action=band&item=boneyard
     
    Karl Core, Dec 16, 2004
    #4
  5. Edd Grant

    Mark Parnell Guest

    Previously in alt.html, Mark Parnell <>
    said:

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

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Dec 16, 2004
    #5
  6. On 16 Dec 2004 15:37:15 -0800, Edd Grant <> wrote:

    [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

    --
    Michael Winter
    Replace ".invalid" with ".uk" to reply by e-mail.
     
    Michael Winter, Dec 16, 2004
    #6
  7. Edd Grant

    rf Guest

    Edd Grant wrote:

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

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


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


    --
    Cheers
    Richard.
     
    rf, Dec 16, 2004
    #7
  8. Edd Grant

    rf Guest

    rf, Dec 16, 2004
    #8
  9. On Thu, 16 Dec 2004 23:59:10 GMT, rf <rf@.invalid> wrote:

    > Barbara de Zoete wrote:
    >
    >> Don't know about XHTML, but in HTML the anchor element doesn't allow
    >> href
    >> as attribute.

    >
    > http://www.w3.org/TR/html4/struct/links.html#edef-A
    >


    Don't know why I typed href. Ment to type alt attribute.

    for href:
    href %URI; #IMPLIED -- URI for linked resource --

    I knew that. WRAAH. Sometimes ...

    --
    Weblog | <http://home.wanadoo.nl/b.de.zoete/_private/weblog.html>
    Webontwerp | <http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html>
    Zweefvliegen | <http://home.wanadoo.nl/b.de.zoete/html/vliegen.html>
     
    Barbara de Zoete, Dec 17, 2004
    #9
  10. Edd Grant

    Henry Guest

    Edd Grant wrote:
    > 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...
     
    Henry, Dec 17, 2004
    #10
  11. Edd Grant

    Big Bill Guest

    On Fri, 17 Dec 2004 10:52:14 +1100, Mark Parnell
    <> wrote:

    >Previously in alt.html, Mark Parnell <>
    >said:
    >
    >> 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.


    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
    --
    www.kruse.co.uk
    home of SEO that's shiny!
    --
     
    Big Bill, Dec 17, 2004
    #11
  12. Edd Grant

    Sam Hughes Guest

    "rf" <rf@.invalid> wrote in
    news:ijpwd.75499$:

    > Barbara de Zoete wrote:
    >
    >> Don't know about XHTML, but in HTML the anchor element doesn't
    >> allow href as attribute.

    >
    > http://www.w3.org/TR/html4/struct/links.html#edef-A


    You mean we're not supposed to use <a onClick=...>?????!!?!?

    ;-)
     
    Sam Hughes, Dec 17, 2004
    #12
  13. Big Bill <> wrote:

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


    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.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
     
    Jukka K. Korpela, Dec 17, 2004
    #13
  14. Edd Grant

    Big Bill Guest

    On Fri, 17 Dec 2004 21:24:02 +0000 (UTC), "Jukka K. Korpela"
    <> wrote:

    >Big Bill <> wrote:
    >
    >>>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?

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


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

    BB
    --
    www.kruse.co.uk
    home of SEO that's shiny!
    --
     
    Big Bill, Dec 18, 2004
    #14
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dave

    Datagrid PageCount Nightmare!!

    Dave, Nov 13, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    1,577
  2. Alvin Bruney

    win2k Installation nightmare

    Alvin Bruney, Nov 27, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    269
    Alvin Bruney
    Nov 27, 2003
  3. =?Utf-8?B?RWxkb24gRmVycmFuIGRlIFBvbA==?=

    Wiring up events nightmare

    =?Utf-8?B?RWxkb24gRmVycmFuIGRlIFBvbA==?=, Dec 17, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    320
    Rajagopal Pasupuleti
    Dec 17, 2004
  4. =?Utf-8?B?RWxkb24gRmVycmFuIGRlIFBvbA==?=

    Wiring Up Events Nightmare

    =?Utf-8?B?RWxkb24gRmVycmFuIGRlIFBvbA==?=, Dec 17, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    422
    John Saunders
    Dec 17, 2004
  5. =?Utf-8?B?SSBhbSBTYW0=?=

    Custom Server Control Nightmare

    =?Utf-8?B?SSBhbSBTYW0=?=, May 29, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    488
    Kevin Spencer
    May 29, 2005
Loading...

Share This Page