Forum Moderators: open
Second, <p> </p> requires 13 extra characters, but <p class="t"> requires only 9 extra characters and is (ahem) semantically correct. The empty paragraph really isn't a paragraph at all, it's really a rendering instruction.
And if you almost always want the extra space, then it requires NO extra characters in the HTML, because you just declare the rule for p in your CSS.
Reid: possible, though I check pages in a GOB of browsers and haven't ever seen this occur. I do NOT have a way of checking mac browsers as yet, so if that's where it might happen that would account for me not seeing it.
I can't tell you how often I've tried to change a layout and not been able to figure where extra padding/margin was coming from. Your original way has the virtue of being always and immediately obvious.
<p> </p> is that it's meaningless - and you're not really any further forward than before. Same with <br> for that matter. If you set the margin in the CSS, you can fine-tune it, whereas
<p> </p> will just give you the default top and bottom paragraph margin (which may vary from browser to browser) or you can double the gap compared to your defined paragraph CSS style. If later you want to change the gap, you can just make the change in the CSS file rather than messing with clearing the cruft from each page. Would you use
to move an item over to the right?
However, there could be a basic difference in what you're saying, encyclo, and what a lot of people need: unless you're tweaking pixelish, you don't NEED a pixel-perfect solution in the CSS margin settings. I'd bet a lot of people take a look at a crammed/cramped page and say "Oy. I need some neg space here!" They aren't necessarily looking for pixelated perfection - they're looking for AIR!
And for those situations (assuming that not too many browsers seriously trash the page), the paragraphed non-breaking space is fairly sensible. Equally obvious, there will be at some point the need on a well-designed and coded page to use that pixel-perfect solution - but quick and dirty though still validates is great if what you want is to give a page a quickie expansion along the lines of "don't fence me in!"
Lynx browsers definitely display
I'm not sure which version of Lynx you are using, but mine doesn't do this (Lynx Version 2.8.5dev.12).
I know of no browser which displays
as anything other than a space, unless you've got some kind of character encoding problem (and even that shouldn't make a difference).
another reason - some browsers will display all over your pages.
If you're working with a site that doesn't use CSS, what about simple <br> or <p> tags to insert blanks lines between paragraphs of text? Not especially elegant, but might do the job, depending on how much space you want.
<ul><li> </li><li> </li></ul>
or you could use
<blockquote> </blockquote>
or even
<table><tr><td> </td></tr></table>...
(or dare I say it, you could even use a transparent gif!).
But seriously. Your document does not contain a paragraph which consists of a silent exclamation, nor a list which consists of nameless items nor a blockquote where somebody pauses for breath.
You just need to increase the gap between one paragraph and the next. So
p {margin: 2em 0}
or something similar ought to do the job nicely.