Lists and validating

S

Samuël van Laere

Just wondering though.
I normally close any list item like so:
<ul>
<li>Item</li>
</ul>
But its seems a closing tag isn't needed for listitems?
At least the validator doesn't seem to mind.

Regards,
Samuël van Laere
the Netherlands
 
S

Steve Pugh

Samuël van Laere said:
Just wondering though.
I normally close any list item like so:
<ul>
<li>Item</li>
</ul>
But its seems a closing tag isn't needed for listitems?
At least the validator doesn't seem to mind.

Correct, under HTML the closing </li> isn't needed, just like the
closing </p> or </td> isn't needed.

Some older browsers with poor CSS support got into problems if these
tags were missing but other than that there's no _need_ to include
them. Many people do so just because it looks tidier to them.

And in XHTML they are of course required.

Steve
 
S

Samuël van Laere

Steve Pugh said:
Correct, under HTML the closing </li> isn't needed, just like the
closing </p> or </td> isn't needed.

Some older browsers with poor CSS support got into problems if these
tags were missing but other than that there's no _need_ to include
them. Many people do so just because it looks tidier to them.

And in XHTML they are of course required.

I didn't know older browsers might have problems with missing closing tags,
where they are not required.
I to use them anyway since it looks much better, its to bad the strict
doctype
doesn't require them, strict isn't that strict if one would exspect it to
be.
For me there no point in using XHTML, if there is a point to start with
anyway.

Thanks for clarifying it anyway Steve.

Regards,
Samuël
 

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

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top