validation <br>

S

steve

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
 
B

brucie

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

William Tasso

brucie said:
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.
 
T

Toby A Inkster

brucie said:
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).
 
S

steve

steve said:
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
 

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

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top