25
Jun
You’re doing it all wrong
More and more I’m growing to hate WYSIWYG editors is something that they do very poorly. That is, the use of the (non-breaking space) next to a space so as to add two spaces between sentences.
This, my friends, is wrong.
Let’s look at why. First, take the name: non-breaking space. It says two things about what this HTML entity means and should be used for.
It is a space. That is clear enough since it is (mis)used often to add margin, padding or word spacing on a webpage. (Which by-the-way can all be accomplished using CSS and the :first-letter selector.)
It is non-breaking. This part is less understood. You see, when you write text for HTML you can image that depending on many browser variables (i.e. font size, page width, letter spacing, etc.) a sentence could line break anywhere there is white space. But it is sometimes the case that there should not be a line break between two words such as in the case of the name “Mr. Christensen.” These are the appropriate circumstances in which the non-breaking space ought to be applied. Example:
Mr. Christensen
The worst offense of its misuse is when I see:
<p> </p>
This is WYSIWYG code I see in older versions of Dreamweaver and even in the text editor used by Posterous. And it pains me so much now that I know.
For more info check out this post on Yesterdayishere.