Forum Moderators: open

Message Too Old, No Replies

Proper Use of <ul>

Directories should be using <p> instead?

         

squared

12:13 am on Jan 3, 2003 (gmt 0)

10+ Year Member



Hi all,

I'm putting together a directory and am wondering if I should be using <p> instead of an <ul> to show listings of sites.

When the ODP or Yahoo make a directory page, they use <ul> to display their content. I'm starting to think this is the wrong way to go. If it was just a simple list, wihout the annotations, then, yes I would use <ul>. However, since they both annotated their lists, doesn't the nature of the list change?

The more I get to know HTML, the more I feel I should be using <p> to separate each site and then use CSS to style those <p>s to get a visual effect like the <ul>.

Any purists in the house?

-Squared

andreasfriedrich

12:41 am on Jan 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you are listing websites then you should probably use the list element.

I wouldn´t consider annotations to change this: The li element [w3.org] may contain inline and block elements [w3.org] while the p element [w3.org] may contain only inline elements. From this follows that the W3C did not intend for something to lose its list quality just because the entries were annotated and contained several paragraphs or lists or in fact any block level element.

Andreas

squared

12:56 am on Jan 3, 2003 (gmt 0)

10+ Year Member



Andreas,

Thanks. I'm back on the <ul> tip. If I were a search engine, it would make sense for me to see the list as an <ul>. It was long annotations with multiple sentences that made me think otherwise.

-squared