Datasheet

26
Part I: Getting to Know (X)HTML and CSS
Document headings
Headings (denoted using elements h1 through h6) are different from the
HTML document head. Individual headings structure the text that follows
them, whereas the head identifies or describes the whole document.
In the Ed Tittel page example, the h1 element sets off the Contact block at
the bottom of the page.
Paragraphs and more
When you want running text on a Web page, the paragraph element, p (which
includes the <p> and </p> tags), breaks text into paragraphs. You can also
create horizontal rules (lines) by using the <hr /> element.
HTML also includes all kinds of ways to emphasize or identify text inside
paragraphs; Parts II and III of this book show a few of them.
Lists
HTML permits easy definition of unordered or bulleted lists. Various mecha-
nisms to create other kinds of lists, including numbered lists, are also avail-
able. Lists can be nested within lists to create as many levels of hierarchy as
your list might need (perhaps when outlining a complex subject or model-
ing a table of contents with several heading levels you want to represent).
Chapter 5 covers creating lists in more detail.
Tables
In addition to providing a variety of listing mechanisms, HTML also includes
markup for defining tables. (Tables were really popular at one time in HTML
design, and they were used for all kinds of page layouts; today, they’re used
for tables, as they should be.) Structure is part of how markup works, so
within the definition of a table, you can
Distinguish between column heads and table data
Manage how rows and columns are laid out
Cascading Style Sheet markup
CSS markup can occur in separate style-sheet documents, in a block of text
in the head of an HTML document, or appended in the style attribute within
individual HTML elements — and even in some combination of all three
such forms! What CSS does is provide much more detailed control over
06_9780470916599-ch01.indd 2606_9780470916599-ch01.indd 26 11/30/10 12:23 AM11/30/10 12:23 AM