[Pmwiki-users] Minor formatting suggestion: <p /> after lists

Nathan Jones nathanj
Tue Sep 23 17:31:42 CDT 2003


Joakim Erdfelt <joakim at erdfelt.net> wrote:
>I'd like to add that the use of empty paragraph <p /> tags is
>against web standards.

As the extract from the spec that you quoted says, empty p elements are
discouraged (not forbidden) and should be ignored. Since they are
ignored, there's no great harm in having redundant <p /> tags if omitting
them would involve a big change a program's algorithm.

>  Given an empty instance of an element whose content model is not
>  EMPTY (for example, an empty title or paragraph) do not use the
>  minimized form (e.g. use <p> </p> and not <p />).

Again, though, this refers to empty paragraphs - I was thinking about
paragraphs that contain text. Admittedly, it would be nice to enclose the
text of a paragraph between start and end tags, but not always easy to
achieve without extensive reqorking of the logic in an existing program.

Fortunately, the spec says that starting a paragraph with <p /> and
omitting the end tag is perfectly valid, even is this is only allowed for
backward compatibility with earlier HTML recommendations and usage.

-- 
Nathan Jones



More information about the pmwiki-users mailing list