Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > validation <br>

Reply
Thread Tools

validation <br>

 
 
steve
Guest
Posts: n/a
 
      11-29-2003
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


 
Reply With Quote
 
 
 
 
brucie
Guest
Posts: n/a
 
      11-29-2003
in post <news:bq8rfc$2rd$(E-Mail Removed)>
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
 
Reply With Quote
 
 
 
 
William Tasso
Guest
Posts: n/a
 
      11-29-2003
brucie wrote:
> in post <news:bq8rfc$2rd$(E-Mail Removed)>
> 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


 
Reply With Quote
 
Toby A Inkster
Guest
Posts: n/a
 
      11-29-2003
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

 
Reply With Quote
 
steve
Guest
Posts: n/a
 
      11-29-2003
> > 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying a Validation Error in a Validation Summary Control Lucas Tam ASP .Net 2 02-26-2004 07:49 PM
ASP.NET Web Forms Validation Controls are Server-Side or Client-Side Validation? Matt ASP .Net 14 01-30-2004 09:15 AM
Web form validation vs object validation Colin Basterfield ASP .Net 1 11-29-2003 12:10 AM
validation summary doesnt display when there's client-side validation Libs ASP .Net 0 06-25-2003 03:05 PM
Re: only custom validation control does server side validation? Colin Mackay ASP .Net 0 06-25-2003 07:54 AM



Advertisments