HTML and CSS Reference
In-Depth Information
3.3. Tags and Attributes
For the most part, tagsthe markup elements of HTML and XHTMLare
simple to understand and use, since they are made up of common words,
abbreviations, and notations. For instance, the <i> and </i> tags respect-
ively tell the browser to start and stop italicizing the text characters that
come between them. Accordingly, the syllable "simp" in our barebones
example in Figure 3-1 should appear italicized when displayed by the
browser.
Figure 3-1. Compare this browser display with its
Barebones source HTML shown earlier
The HTML and XHTML standards and their various extensions define how
and where you place tags within a document. Let's take a closer look at
that syntactic sugar that holds together all documents.
3.3.1. The Syntax of a Tag
Every tag consists of a tag name , sometimes followed by an optional list
of tag attributes , all placed between opening and closing brackets ( < and
> ). The simplest tag is nothing more than a name appropriately enclosed
in brackets, such as <head> and <i> . More complicated tags contain one
or more attributes, which specify or modify the behavior of the tag.
Search WWH ::




Custom Search