demosthenes.info

A blog by Dudley Storey on , , , , , , and anything else that strikes his fancy.

featured articles

popular favourites

Common HTML Formatting Errors

HTML Is Oblivious To Carriage Returns and Spaces

A common error when making web pages for the first time is to add extra carriage returns to the code – i.e. pressing the “return” key multiple times – in an attempt to get more vertical space between lines. Carriage returns, tabs, and more than one space are ignored by HTML — instead, they must be coded for.

A common alternative error is to add tags that are devoid of content to attain the same effect – i.e. <p></p> <p></p> <p></p>, also known as “empty tags”. These should be avoided at all costs: there should never be elements empty of content in a page, and the presence of such makes adding CSS to a page far more difficult.

(For those who may have attempted to make web pages in the past, <br /> tags and &nbsp; HTML entitities fall into the same category.)

web developer guide

featured comment

by JoelB in Goodbye, JQuery Validation: HTML5 Form Errors With CSS3

what i'm reading

A Storm of Swords: A Song of Ice and Fire: Book Three
A Storm of Swords: A Song of Ice and Fire: Book Three

what i'm watching

Californication: The Third Season
Californication: The Third Season

what i'm playing

Mass Effect 3 Collector's Edition
Mass Effect 3 Collector's Edition

what i'm hearing

Dub FX
Dub FX

blogs

podcasts

no ads ever

This blog is free of advertising, and always will be.

creative commons licensed

The content of this blog is free to use in whatever way you wish under the Creative Commons license.