HTML and CSS Reference
In-Depth Information
2.3. Embedded Tags
You probably noticed right away, perhaps in surprise, that the browser
displays less than half of the example source text. Closer inspection of
the source reveals that what's missing is everything that's bracketed in-
side a pair of less-than ( < ) and greater-than ( > ) characters. [ The Syntax
of a Tag, 3.3.1 ]
HTML and XHTML are embedded languages: you insert their directions,
or tags , into the same document that you and your readers load into a
browser to view. The browser uses the information inside those tags to
decide how to display or otherwise treat the subsequent contents of your
document.
For instance, the <i> tag that follows the word Hello in the simple ex-
ample tells the browser to display the following text in italics. [*] [ Physical
Style Tags, 4.5 ]
[*] Italicized text is a very simple example and one that most browsers, except the text-only variety (e.g.,
Lynx), can handle. In general, the browser tries to do as it is told, but as we demonstrate in upcoming
chapters, browsers vary from computer to computer and from user to user, as do the fonts that are avail-
able and selected by the user for viewing HTML documents. Assume that not all are capable of or willing
to display your HTML document exactly as it appears on your screen.
The first word in a tag is its formal name, which usually is fairly descript-
ive of its function, too. Any additional words in a tag are special attrib-
utes , sometimes with an associated value after an equals sign ( = ), which
further define or modify the tag's actions.
2.3.1. Start and End Tags
Most tags define and affect a discrete region of your document. The re-
gion begins where the tag and its attributes first appear in the source
document (a.k.a. the start tag ) and continues until a corresponding end
tag . An end tag is the tag's name preceded by a forward slash ( / ). For
example, the end tag that matches the "start italicizing" <i> tag is </i> .
 
 
Search WWH ::




Custom Search