validation <br>

Discussion in 'HTML' started by steve, Nov 29, 2003.

  1. steve

    steve Guest

    Hi all

    I'm trying to validate this page but having a problem

    The problem code is:
    <li><a name="1" class="faqotgov">What is the problem?</a></li>
    <br>

    The error is:
    Line 123, column 3: document type does not allow element "BR" here;
    assuming missing "LI" start-tag
    <br>
    ^

    Why is that?

    Thanks
     
    steve, Nov 29, 2003
    #1
    1. Advertising

  2. steve

    brucie Guest

    in post <news:bq8rfc$2rd$>
    steve said:

    > <li><a name="1" class="faqotgov">What is the problem?</a></li>
    > <br>
    > Line 123, column 3: document type does not allow element "BR" here;
    > assuming missing "LI" start-tag
    > <br>
    > ^
    > Why is that?


    the only valid elements within a list are <ul>, <ol> or <li> you cant
    have orphan markup just floating around giggling to itself. what is the
    <br> for? if you need it for some reason stick it in just before the
    </li>. if you're using it for spacing don't, use css paddings and/or
    margins.

    --
    brucie
    29/November/2003 11:07:18 am
     
    brucie, Nov 29, 2003
    #2
    1. Advertising

  3. brucie wrote:
    > in post <news:bq8rfc$2rd$>
    > steve said:
    >
    >> <li><a name="1" class="faqotgov">What is the problem?</a></li>
    >> <br>
    >> Line 123, column 3: document type does not allow element "BR" here;
    >> assuming missing "LI" start-tag
    >> <br>
    >> ^
    >> Why is that?

    >
    > the only valid elements within a list are <ul>, <ol> or <li> you cant
    > have orphan markup just floating around giggling to itself. what is
    > the <br> for? if you need it for some reason stick it in just before
    > the </li>. if you're using it for spacing don't, use css paddings
    > and/or margins.


    or start a new list - if appropriate.


    --
    William Tasso - http://WilliamTasso.com
     
    William Tasso, Nov 29, 2003
    #3
  4. brucie wrote:

    > the only valid elements within a list are <ul>, <ol> or <li> you cant
    > have orphan markup just floating around giggling to itself.


    Actually, the only element allowed directly inside a list is <li> (unless
    you count definition lists, in which case only <dd> and <dt> are allowed).

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
     
    Toby A Inkster, Nov 29, 2003
    #4
  5. steve

    steve Guest

    > > steve said:
    > >
    > >> <li><a name="1" class="faqotgov">What is the problem?</a></li>
    > >> <br>
    > >> Line 123, column 3: document type does not allow element "BR"

    here;
    > >> assuming missing "LI" start-tag
    > >> <br>
    > >> ^
    > >> Why is that?

    > >
    > > the only valid elements within a list are <ul>, <ol> or <li> you

    cant
    > > have orphan markup just floating around giggling to itself. what

    is
    > > the <br> for? if you need it for some reason stick it in just

    before
    > > the </li>. if you're using it for spacing don't, use css paddings
    > > and/or margins.

    >
    > or start a new list - if appropriate.


    I never know that I can not have any code inside <ul>
    I learn something new, even I told I suppose to know it.

    Thanks
     
    steve, Nov 29, 2003
    #5
    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,723
    Colin Mackay
    Jun 25, 2003
  2. Libs
    Replies:
    0
    Views:
    1,556
  3. Colin Basterfield

    Web form validation vs object validation

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

Share This Page