[thelist] should we use <p> within lists...

aardvark roselli at earthlink.net
Tue Sep 10 23:52:00 CDT 2002


> From: "Dunstan Orchard" <dunstan at 1976design.com>
[...]
> Can I get someone else's thoughts on the use of <p></p> tags within
> lists (both normal and definition)...

http://lists.evolt.org/archive/Week-of-Mon-20020819/121039.html

> It's my usual practice not to use paragraph tags when writing lists,
> but what happens when list items become extended and you need to
> seperate sections of content?
>
> eg. From a list of courses:
>
> <dl>
> <dt>Web Design with Molly, Level III—Advanced.</dt>
> <dd><p>If you're looking for an intensive, hands-on workshop
> concentrating on advanced web techniques, then this is the workshop
> for you! This two-day hands- on workshop highlights Advanced HTML 4,
> Advanced Web Graphics, and Cascading Style Sheets.</p> <p>Attendees
> will learn how to work with complex tables, frames, and forms, and
> gain an understanding of how HTML interacts with other programming
> languages. As a special bonus, Molly provides power tips and tricks
> for building attractive, highly visual Web sites.</p></dd> </dl>

i see this as a page of headings and paragraphs, not a <dl>... i
would ask myself why i'm using the <dl> to begin with -- the
indentation?  not a good enough reason because now you're using it
for style over structure semantics...

my analagous page:

<h1>Available Courses</h1>

<h2>Web Design with Molly, Level III—Advanced.</h2>

<p>
Content.
</p>

now use CSS indent/outdent the stuff you were trying to futz around
with in the <dl>...

> Someone suggested that if you get to the point where you need to
> seperate sections out, then the content would be better coded as a
> heading and paragraph. But I'd still like to come up with a rule for
> this anyway.

i think the rules can be both simple and complex... things that are
definitions get <dl>s... things that are bullet/number lists go in
lists... things that are really big don't go in either, they get
headings and paragraphs... how do you make that call?  could be based
on the nature of the content, the design of the page, the cut of your
pants, etc...

> One solution is to not use paragraph tags unless they are called for.
> This seems to work fine, but I'm worried that if styling is applied to
> <p> then there will be differences between those lists coded without
> <p> and those coded with.

only if you apply styles to your base <p> that could interact with
the <li> styles (left/right padding/margins, % font sizes, etc.)...
otherwise, there shouldn't be much problem...

i find i don't style <p>s for the most part, except maybe to adjust
spacing above/below, and i'd want that to carry over to lists
anyway... instead, i style the <body> and/or the container...

> The obvious solution to this is to code every list with <p> tags or
> create seperate styles for <p> within lists.

see above... don't style <p> at all, and if you do, note possible
interactions...

> What are your thoughts on this matter?
> Has anyone else thought this thing through before?

see above, and yes...

> Should we be using <p> tags around all our content (except headings)?
> I'm interested in this from a structural point of view...

nearly all my content has <p>s, save for data in data tables, lists,
blockquotes, headings, and a few other exceptions i can't think of as
i fall asleep on my keyboard...

--
Read the evolt.org case study
Usability: The Site Speaks for Itself
http://amazon.com/exec/obidos/ASIN/1904151035/evoltorg02-20
ISBN: 1904151035





More information about the thelist mailing list