Answers Search Help
Boston University home page
HTML: Introduction
 
 
    Components
 
 
 
 
 
 
    Syntax
 
 
 
 
 
    Essential Tags
 
 
 
 
 
 
 
 
    HTML Headings
 
 
    Text
 
 
 
 
    Layout
 
 
 
 
 
 
 
    Links & Images
 
 
 
 
    Publishing
 
 
    Also See
 
 

Headings

Formatting an HTML document usually requires little more than identifying the word, sentence or section you wish to format and applying the appropriate opening and closing HTML tags to the selection. Let's begin with headings.

Headings, simply put, are a way to organize your document and distinguish different sections and topics.

<h1> through <h6> tags

Heading <h1> through <h3> display a larger, bolder font than the default font for most browser software. Headings <h5> and <h6> display a smaller font than the default. The <h4> heading usually displays the default font size in bold.

Headings require an opening and a closing tag:

<h1>, <h2>, ... <h6> - opening tags
</h1>, </h2>, ... </h6> - closing tags

All text between the opening and closing tags will be part of the heading. The tag has no other effect on non-text elements. The heading tags also place a blank line after the heading, so there is no need to use paragraph or line break tags with a heading.

CODE EXAMPLE:

<h1>Heading One</h1> <h3>Heading Three </h3>
<h6>Heading Six</h6>

RESULT:

Heading One

Heading Three

Heading Six

NOTE: Many things in HTML can be a little confusing, and this is one of them. For HTML Headings, H1 is the largest and H6 is the smallest. When we get to the FONT SIZE options, they work in the opposite way -- the smaller number produces a smaller font and increasing the number increases the font size.

 

WebCentral Using Publishing Learning Training Consulting WebCentral
Answers Search Help
NIS  |  OIT  |  Boston University  |   January 9, 2007