Tags that Organize Text

Paragraphs

Text is generally organized into paragraphs. Use <p> and </p> to surround your paragraphs.

Line Breaks

One of the more confusing issues for beginning page designers is that HTML ignores any carriage returns in your text (when you press the Enter key). That often makes lines and paragraphs run together in one large blob. To force a new line you must you a "line break" code or end a paragraph. The line break code, <br>, is one of the few markup codes that is not used in a start/end pair.

Headlines

To display a heading or title to a section of text, use the <hx> and </hx> markup codes. Replace x with a number from 1 through 6. By default h1 displays the largest headline and h6 is the smallest. You can change the size and look of all these later when we add CSS.

Following is a sample of each, from h1 to h6:

Heading h1

Heading h2

Heading h3

Heading h4

Heading h5
Heading h6

To optimize search engine classification, you should always use h1 for your most important headings, h2 for secondary headings, h3 for less important headings, and so on.

Bold and Italic type

To create bold type, enclose text between <b> and </b>. For italic text, use <i> and </i>.


Lines (Horizontal Rules)

To add a line like the one above, just use <hr>. This is another tag that appears without a separate end tag.

Click here to continue

Valid HTML 4.01 Strict