HTML and CSS Reference
Notice that I indented the headings in this example to better show the hierarchy. They
don't have to be indented in your page; in fact, the browser ignores the indenting.
Even though the browser ignores any indenting you include in your
code, you will probably find it useful to indent your code so that
it's easier to read. You'll find that any lengthy examples in this
book are indented for that reason, and you'll probably want to
carry that convention over to your own HTML code.
Unlike titles, headings can be any length, spanning many lines of text. Because headings
are emphasized, however, having many lines of emphasized text might be tiring to read.
A common practice is to use a first-level heading at the top of your page to either dupli-
cate the title (which usually is displayed elsewhere), or to provide a shorter or less con-
text-specific form of the title. If you have a page that shows several examples of folding
bed sheets—for example, part of a long presentation on how to fold bed sheets—the title
might look something like the following:
<title> How to Fold Sheets: Some Examples </title>
The topmost heading, however, might just be as follows:
<h1> Examples </h1>
Don't use headings to display text in boldface type or to make cer-
tain parts of your page stand out more. Although the result might
look cool in your browser, you don't know what it'll look like when
other people use their browsers to read your page. Other browsers
might number headings or format them in a manner that you don't
Tools to create searchable indexes of web pages might extract your headings to indicate
the important parts of a page. By using headings for something other than an actual
heading, you might be foiling those search programs and creating strange results.