W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2005

[whatwg] <p> elements containing other block-level elements

From: fantasai <fantasai.lists@inkedblade.net>
Date: Sun, 17 Jul 2005 06:01:38 -0400
Message-ID: <42DA2C82.4050500@inkedblade.net>
dolphinling wrote:
> Then what I said later applies: <p> isn't for marking up paragraphs. The 
> natural language tells the reader that it's a paragraph, so the markup 
> doesn't need to. The markup is for separating one block of text from the 
> next.

Markup is for marking up the structure of the document and the semantics
of that structure. Distinguishing visual blocks of text is for the style
sheet to handle (e.g. CSS's 'display' property). Paragraphs are a logical
unit, not a visual one.

The appropriateness or inappropriateness of one's markup can often be
made more explicit with a non-traditional style sheet, like the one I
use in
Every paragraph is enclosed with a border, so it's obvious where it
begins and ends. It's also obvious when the unordered list is part of
the same paragraph as the preceding text:
And when it's not:
     (2 paragraphs after the Example header)

Currently, I am not able to express the structure and semantics of
paragraphs containing block-level lists or quotes, and my workaround
is to use <div class="para"> to contain all the paragraph's elements
and style that instead of the <p>. With WA1, this would not have been
necessary because I could encode the structure and semantics of the
document's paragraphs directly.

Received on Sunday, 17 July 2005 03:01:38 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:41 UTC