HTML and CSS Reference
In-Depth Information
3.5. Document Content
Nearly everything else you put into your HTML or XHTML document that
isn't a tag is, by definition, content, and the majority of that is text. Like
tags, document content is encoded using a specific character setby de-
fault, the ISO-8859-1 Latin character set. This character set is a super-
set of conventional ASCII, adding the necessary characters to support
the Western European languages. If your keyboard does not allow you to
directly enter the characters you need, you can use character entities to
insert the desired characters.
3.5.1. Advice Versus Control
Perhaps the hardest rule to remember when marking up an HTML or
XHTML document is that all the tags you insert regarding text display and
formatting are only advice for the browser: they do not explicitly con-
trol how the browser will display the document. In fact, the browser can
choose to ignore all of your tags and do what it pleases with the doc-
ument content. What's worse, the user (of all people!) has control over
the text-display characteristics of her own browser.
Get used to this lack of control. The best way to use markup to control
the appearance of your documents is to concentrate on the content of
the document, not on its final appearance. If you find yourself worrying
excessively about spacing, alignment, text breaks, and character posi-
tioning, you'll surely end up with ulcers. You will have gone beyond the
intent of HTML. If you focus on delivering information to users in an at-
tractive manner, using the tags to advise the browser as to how best to
display that information, you are using HTML or XHTML effectively, and
your documents will render well on a wide range of browsers.
3.5.2. Character Entities
Besides common text, HTML and XHTML give you a way to display special
text characters that you normally might not be able to include in your
source document or that have other purposes. A good example is the
 
Search WWH ::




Custom Search