Web Hosting Talk







View Full Version : HTML Tidy is being ANAL. <p></p> not allowed


grabmail
06-08-2006, 09:06 PM
My page validates XHTML 1.0 Strict.
But when i check using the HTML Tidy extension in Firefox.

It does not allow <p></p> empty tags

I'm using it for vertical spacing.

what is an alternative to it?

<div style="padding:10px"></div>

That's just so dumb to me, even though it's semantically correct. Compare that length to <p></p>

Should i ignore html tidy?

the--dud
06-08-2006, 10:16 PM
If you write good (x)html from the start you wont need a program to tidy up for you ;)

Burhan
06-09-2006, 05:31 AM
An empty paragraph doesn't make sense. You shouldn't be using it for "veritcal spacing" as the spacing of paragraphs will vary from UA to UA.

Instead, use a div, or a <br /> tag.

Just because something validates, doesn't mean its semantically correct, and using <p></p> for vertical spacing is definately not semantically correct.

grabmail
06-09-2006, 09:16 AM
Yeah. i've changed to div and html tidy is happy now

grabmail
06-09-2006, 04:28 PM
YES! FINALLY! now ALL my pages are XHTML 1.0 Strict COmpliant. Whew!