validation

Discussion in 'HTML' started by fulio pen, Aug 12, 2011.

  1. fulio pen

    fulio pen Guest

    I usually didn't validate any page, as it displayed just fine without
    the validation. Recently I tried to do it on some pages. But some
    instructions seemed confusing For instance, once I had following
    division:


    <div id='source'>
    <span><u>Source</u>: </span> <br />
    Language: Textbook One. 2nd edition: June 1984. 7th Printing June
    1988. Shanghai: Education Press.
    </div>

    After validating, I got following three messages, but still didn't see
    anything with the division:

    Validation Output: 3 Errors

    Line 47, Column 1: Saw < when expecting an attribute name. Probable
    cause: Missing > immediately before.
    <div id='source'>
    ✉
    Line 47, Column 17: End tag had attributes.
    <div id='source'>
    ✉
    Line 47, Column 17: Stray end tag div..
    <div id='source'>

    Can anyone tell what the 3 messages really mean? And what to do to
    correct the errors? Thanks.

    fullio pen
     
    fulio pen, Aug 12, 2011
    #1
    1. Advertising

  2. 12.8.2011 21:37, fulio pen wrote:

    > <div id='source'>
    > <span><u>Source</u>:</span> <br />
    > Language: Textbook One. 2nd edition: June 1984. 7th Printing June
    > 1988. Shanghai: Education Press.
    > </div>
    >
    > After validating, I got following three messages, but still didn't see
    > anything with the division:


    That's because the problem is earlier in the document. This is one
    reason why you should post a URL, not (just) code snippets.

    > Line 47, Column 1: Saw < when expecting an attribute name. Probable
    > cause: Missing> immediately before.


    So there's something missing _before_ the div element.

    > Line 47, Column 17: End tag had attributes.


    So apparently there is something like </div (an end tag without the
    closing ">") before the div. The error messages are somewhat confusing
    because the error makes the validator parse your tag <div id='source'>
    as if it were part of the preceding end tag.

    P.S. Independently of this, consider using something else instead of
    <u>. It should only be used in situations where you really mean
    typographical underline, and underlining anything but a link is risky on
    the web, because underlining is so often understood as meaning a link.
    Using <strong> might be better, or maybe <em>; maybe no markup and no
    styling is really needed.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Aug 12, 2011
    #2
    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. Colin Mackay
    Replies:
    0
    Views:
    2,701
    Colin Mackay
    Jun 25, 2003
  2. Libs
    Replies:
    0
    Views:
    1,523
  3. Colin Basterfield

    Web form validation vs object validation

    Colin Basterfield, Nov 28, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    433
    Tommy
    Nov 29, 2003
  4. Matt
    Replies:
    14
    Views:
    4,140
    Chad Z. Hower aka Kudzu
    Jan 30, 2004
  5. Lucas Tam
    Replies:
    2
    Views:
    1,124
    Lucas Tam
    Feb 26, 2004
Loading...

Share This Page