Web Page Design Boot Camp

  Home |  Basics |  Intermediate |  Advanced |  Tools |  Site Map    Subtopics:

Text Formatting

Line Breaks

HTML is free format, so it doesn't matter how you type in the content. All formatting is done by the tags you put in the document, not by the number of blank lines you entered or where you pressed the enter key. There are a couple of tags you can use to force text to begin on a new line. They are the break <br> and the paragraph <p> tags. The <br> tag forces the following text to begin on the next line. The <p> tag skips a blank line before continuing the text in the document.

This HTML... Produces this...
Mickey Mouse and
Donald Duck
Mickey Mouse and Donald Duck
Bugs Bunny and<br>
Daffy Duck
Bugs Bunny and
Daffy Duck
Yogi Bear and<p>
Ranger Smith
Yogi Bear and

Ranger Smith

Text Formats

Character formats like bold, italics, and underlining can be applied to text in web pages by using the tags shown below separately or in combination.

This HTML... Produces this...
This text is <b>boldface</b>.
This text is boldface.
This text is <i>italics</i>.
This text is italics.
This text is <u>underlined</u>.
This text is underlined.
This text is <b><i>boldface italics</i></b>.
This text is boldface italics.

Note in the last example that the tags used to turn off the character format must be specified in the reverse order from when they were turned on.

Headings

HTML documents can have six different levels of headings, each of which has a predefined size and character style.

This HTML... Produces this...
<h1>Level 1 Heading</h1>

Level 1 Heading

<h2>Level 2 Heading</h2>

Level 2 Heading

<h3>Level 3 Heading</h3>

Level 3 Heading

<h4>Level 4 Heading</h4>

Level 4 Heading

<h5>Level 5 Heading</h5>
Level 5 Heading
<h6>Level 6 Heading</h6>
Level 6 Heading