Skip to Content
Web Design in a Nutshell, 3rd Edition
book

Web Design in a Nutshell, 3rd Edition

by Jennifer Robbins
February 2006
Intermediate to advanced
826 pages
63h 42m
English
O'Reilly Media, Inc.
Content preview from Web Design in a Nutshell, 3rd Edition

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 p or br element 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 the white-space: pre property 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 the white-space: pre property in a style sheet. Tabs in the source document are problematic for some browsers and are best avoided.

Empty p elements

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 multiple br elements as multiple line breaks.

Unrecognized element

A browser simply ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Responsive Web Design with HTML5 and CSS3

Beginning Responsive Web Design with HTML5 and CSS3

Jonathan Fielding

Publisher Resources

ISBN: 0596009879Errata Page