Forum Moderators: open

Message Too Old, No Replies

Extra space between list items (li) - valid method needed

This page is not Valid HTML 4.01 Transitional! says the w3c validator

         

followgreg

9:25 am on Oct 29, 2004 (gmt 0)

10+ Year Member



Hi,

I was checking my pages with the HTML validator at [validator.w3.org...] and it keeps telling me my page is not ok because of :

Line 54, column 8: document type does not allow element "BR" here; assuming missing "LI" start-tag

<br><BR>
Line 56, column 8: document type does not allow element "BR" here; assuming missing "LI" start-tag

<br><BR>

OR Line 66, column 12: document type does not allow element "STRONG" here; assuming missing "LI" start-tag

<strong>I love beef dip at quiznoz</strong>

MY pages look ok, so i don't know what to do?
How to give more room after each </li> tag if not using <br>?

And another question, do i really have to put all my <li> tags between <ul> tags?

Are those issues a problem for SEO?

I know this is some questions, so thanks be advance if someone answers.

rick2004hunter

9:40 am on Oct 29, 2004 (gmt 0)

10+ Year Member



I was looking through your question

insted of BR tag try with <P></P> this should help you

janevok

9:50 am on Oct 29, 2004 (gmt 0)

10+ Year Member



you could also try keeping your html tags in lowercase, this has removed errors for me in the past.

it could also make no difference at all.

encyclo

11:49 am on Oct 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I guess you're doing something like this:

<ul>
<li>text</li>
<br>
<li>text</li>
</ul>

To answer your questions: yes, you should always use a

<ul>
around a list. To control the space between list items, you can use CSS. For example:

li {
margin:5px 0;
}

You can also use CSS to remove the margins on the

<ul>
element.

sonjay

11:54 am on Oct 29, 2004 (gmt 0)

10+ Year Member



In your stylesheet:

li { margin-bottom:12px; }

No extra <br>'s, no extra <p>'s -- and if you have a lot of lists on your site, think of all the typing (and possible typos) you'll be missing out on.

(Edited to add: Whoops! Encyclo beat me to it.)

ronin

12:21 pm on Oct 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



And another question, do i really have to put all my <li> tags between <ul> tags?

Yes.

<un-ordered list>
<list item>foo</list item>
<list item>foo</list item>
<list item>foo</list item>
</un-ordered list>

How else did you want to do it?

tedster

6:04 pm on Oct 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Down and dirty (but valid) you can also do this:

<ul>
<li>text<br>&nbsp;</li>
<li>text</li>
</ul>

followgreg

5:26 am on Oct 30, 2004 (gmt 0)

10+ Year Member




Hey guys Thanks a lot for your answers.

I actually used a bit of all your tips and found out something that fits what i wanted to do.

This part of the forum rocks! ;-)