Information Browsers Ignore
Some information in an HTML document, including certain markup, is ignored or has little to no impact on presentation when the document is viewed in a browser or other user agent. These include:
- Line breaks
Line returns in the HTML document are treated as spaces, which then typically collapse with other spaces (see next point). Text and elements wrap continuously until they encounter a
porbrelement within the flow of the document text. Line breaks are displayed, however, when text is marked up as a preformatted (pre) element or styled with thewhite-space: preproperty in a style sheet.- Tabs and multiple spaces
When a user agent encounters more than one consecutive blank character space in an HTML document, it displays it as a single space. So, if the document contains:
far, far away
the browser displays:
far, far away
Extra spaces can be added within the flow of text by using the non-breaking space character entity (
). Multiple spaces are displayed, however, when text is marked up as preformatted text (pre) or with thewhite-space: preproperty in a style sheet. Tabs in the source document are problematic for some browsers and are best avoided.-
Empty
pelements Empty paragraph elements (
<p>...</p>or<p>alone) with no intervening text are interpreted as redundant by all browsers and displayed as though they were only a single paragraph break. Most browsers display multiplebrelements as multiple line breaks.- Unrecognized element
A browser simply ...