The Comprehensive HTML Cross Reference


Block Formatting Tags

This document describes tags that change the formatting of a block of characters and cause a line break before and after the tag.

Click here to skip over the explanatory material at the top of the page and jump straight to the tags.

This table:

Support: HTML:2.0, 3.0, 3.2  Netscape:1.1+  MS Explorer:1.0+
and these icons:
(HTML 3.0 Only) (HTML 3.2 Only) (Netscape Extension) (Microsoft Extension) (Microsoft Extension 3.0)

alert you to tags and attributes that are not supported by all browsers. The support page explains the table and the icons in detail.

CDI Home Page

Finding your way around...

Not all HTML tags are in this single file. The comprehensive list has been split into the following eight categories:

We have also provided several indexes to help you navigate through this reference. In addition to our main indexes (the compact index and the complete index), there are four other indexes that list the tags according to the standards and browsers that support them.

CDI Home Page

The Comprehensive HTML Cross Reference was created as a service to the Internet community. It represents a joint effort of Scott Williams of CDI Corporate Education Services and Kate Gregory of Gregory Consulting and is fully protected by Copyright © 1995 - 2001. Please report any errors or omissions to Kate Gregory.

CDI Home Page

Block Quote


<BLOCKQUOTE> text </BLOCKQUOTE>
(HTML 3.0 Only) <BQ> text </BQ>
(HTML 3.0 Only) <BQ CLEAR = attributes> text </BQ>
(HTML 3.0 Only) <BQ NOWRAP> text </BQ>

The block quote tag defines text that is quoted from elsewhere. Many browsers (including Netscape) display it in an indented block surrounded by blank lines. Other suggestions from the HTML 2.0 spec include displaying the text in italics or starting each line with the Usenet standard quote indicator, >. In HTML 3.0, the CLEAR attribute is used to position a quote after a graphic: it can be LEFT, RIGHT, or ALL and specifies which margin should be clear. The NOWRAP attribute stops the browser from wrapping except at a BR tag.

CDI Home Page

Center
Support: HTML:3.2 Netscape:1.1+ MS Explorer:2.0+


<CENTER> text</CENTER>

The center tag defines text that should be centered.

CDI Home Page

Heading 1


<H1> text </H1>
(HTML 3.2 Only) <H1 ALIGN=alignment > text </H1>
(HTML 3.0 Only) <H1 SRC=
"URL" > text </H1>
(HTML 3.0 Only) <H1 DINGBAT=
"entity-name" > text </H1>
(HTML 3.0 Only) <H1 NOWRAP>
text </H1>
(HTML 3.0 Only) <H1 CLEAR=
clear > text </H1>

The heading 1 tag defines a level 1 heading. It is typically shown in a very large bold font with several blank lines around it, and is used by automatic indexers to describe a page.

The alignment attribute can be LEFT, RIGHT, or CENTER -- it defines the placement of the header on the screen. The SRC attribute identifies a graphic image to be embedded before the header text, while the DINGBAT attribute identifies an iconic entity to be embedded there. The clear attribute is used to position a header after a graphic: it can be LEFT, RIGHT, or ALL and specifies which margin should be clear. The NOWRAP attribute prevents the browser from breaking long header lines; use a BR tag to break those lines yourself.

CDI Home Page

Heading 2


<H2> text </H2>
(HTML 3.2 Only) <H2 ALIGN=alignment > text </H2>
(HTML 3.0 Only) <H2 SRC=
"URL" > text </H2>
(HTML 3.0 Only) <H2 DINGBAT=
"entity-name" > text </H2>
(HTML 3.0 Only) <H2 NOWRAP>
text </H2>
(HTML 3.0 Only) <H2 CLEAR=
clear > text </H2>

The heading 2 tag defines a level 2 heading. It is typically shown in a large bold font with several blank lines around it.

The alignment attribute can be LEFT, RIGHT, or CENTER -- it defines the placement of the header on the screen. The SRC attribute identifies a graphic image to be embedded before the header text, while the DINGBAT attribute identifies an iconic entity to be embedded there. The clear attribute is used to position a header after a graphic: it can be LEFT, RIGHT, or ALL and specifies which margin should be clear. The NOWRAP attribute prevents the browser from breaking long header lines; use a BR tag to break those lines yourself.

CDI Home Page

Heading 3


<H3> text </H3>
(HTML 3.2 Only) <H3 ALIGN=alignment > text </H3>
(HTML 3.0 Only) <H3 SRC=
"URL" > text </H3>
(HTML 3.0 Only) <H3 DINGBAT=
"entity-name" > text </H3>
(HTML 3.0 Only) <H3 NOWRAP>
text </H3>
(HTML 3.0 Only) <H3 CLEAR=
clear > text </H3>

The heading 3 tag defines a level 3 heading. It is typically shown in a large italic font, slightly indented, with blank lines around it.

The alignment attribute can be LEFT, RIGHT, or CENTER -- it defines the placement of the header on the screen. The SRC attribute identifies a graphic image to be embedded before the header text, while the DINGBAT attribute identifies an iconic entity to be embedded there. The clear attribute is used to position a header after a graphic: it can be LEFT, RIGHT, or ALL and specifies which margin should be clear. The NOWRAP attribute prevents the browser from breaking long header lines; use a BR tag to break those lines yourself.

CDI Home Page

Heading 4


<H4> text </H4>
(HTML 3.2 Only) <H4 ALIGN=alignment > text </H4>
(HTML 3.0 Only) <H4 SRC=
"URL" > text </H4>
(HTML 3.0 Only) <H4 DINGBAT=
"entity-name" > text </H4>
(HTML 3.0 Only) <H4 NOWRAP>
text </H4>
(HTML 3.0 Only) <H4 CLEAR=
clear > text </H4>

The heading 4 tag defines a level 4 heading. It is typically shown in a bold font, indented more than an level 3 heading, with blank lines around it.

The alignment attribute can be LEFT, RIGHT, or CENTER -- it defines the placement of the header on the screen. The SRC attribute identifies a graphic image to be embedded before the header text, while the DINGBAT attribute identifies an iconic entity to be embedded there. The clear attribute is used to position a header after a graphic: it can be LEFT, RIGHT, or ALL and specifies which margin should be clear. The NOWRAP attribute prevents the browser from breaking long header lines; use a BR tag to break those lines yourself.

CDI Home Page

Heading 5


<H5> text </H5>
(HTML 3.2 Only) <H5 ALIGN=alignment > text </H5>
(HTML 3.0 Only) <H5 SRC=
"URL" > text </H5>
(HTML 3.0 Only) <H5 DINGBAT=
"entity-name" > text </H5>
(HTML 3.0 Only) <H5 NOWRAP>
text </H5>
(HTML 3.0 Only) <H5 CLEAR=
clear > text </H5>

The heading 5 tag defines a level 5 heading. It is typically shown in an italic font, indented the same as a level 4 heading, with a blank line above it.

The alignment attribute can be LEFT, RIGHT, or CENTER -- it defines the placement of the header on the screen. The SRC attribute identifies a graphic image to be embedded before the header text, while the DINGBAT attribute identifies an iconic entity to be embedded there. The clear attribute is used to position a header after a graphic: it can be LEFT, RIGHT, or ALL and specifies which margin should be clear. The NOWRAP attribute prevents the browser from breaking long header lines; use a BR tag to break those lines yourself.

CDI Home Page

Heading 6


<H6> text </H6>
(HTML 3.2 Only) <H6 ALIGN=alignment > text </H6>
(HTML 3.0 Only) <H6 SRC=
"URL" > text </H6>
(HTML 3.0 Only) <H6 DINGBAT=
"entity-name" > text </H6>
(HTML 3.0 Only) <H6 NOWRAP>
text </H6>
(HTML 3.0 Only) <H6 CLEAR=
clear > text </H6>

The heading 6 tag defines a level 6 heading. It is typically shown in a normal font, indented more than a level 5 heading, with a blank line above it.

The alignment attribute can be LEFT, RIGHT, or CENTER -- it defines the placement of the header on the screen. The SRC attribute identifies a graphic image to be embedded before the header text, while the DINGBAT attribute identifies an iconic entity to be embedded there. The clear attribute is used to position a header after a graphic: it can be LEFT, RIGHT, or ALL and specifies which margin should be clear. The NOWRAP attribute prevents the browser from breaking long header lines; use a BR tag to break those lines yourself.

CDI Home Page

Horizontal Rule


<HR>
(HTML 3.0 Only) <HR SRC= "URL">
(HTML 3.2 Only) <HR SIZE= number>
(HTML 3.2 Only) <HR WIDTH= number%>
(HTML 3.2 Only) <HR ALIGN= alignment%>
(HTML 3.2 Only) <HR NOSHADE>
(Microsoft Extension 3.0) <HR COLOR="colorname">

The horizontal rule tag causes a horizontal line to be drawn across the screen. There is no </HR> tag.

The attributes allow you to specify the thickness of the line (in pixels) with the SIZE attribute. The WIDTH attribute governs what percentage of the screen width is occupied by the rule. The ALIGN attribute aligns a rule that is smaller than the screen: alignment can be LEFT, RIGHT, or CENTER. The NOSHADE attribute prevents the browser from using any shading or three dimensional effects.

(Microsoft Extension 3.0) The COLOR attribute allows you to change the colour of the text. rrggbb is a six digit hexadecimal number with the first two digits specifying the red value, the middle two the green value, and the last two the blue value. Some sample colour values:

red
FF0000
green
00FF00
blue
0000FF
black
000000
white
FFFFFF
grey
888888
yellow
FFFF00
cyan
00FFFF

Colour names can also be used in the COLOR attribute. Valid colours are: Aqua, Black, Blue, Fuchsia, Gray, Green, Lime, Maroon, Navy, Olive, Purple, Red, Silver, Teal,Yellow, and White

(HTML 3.0 Only) The SRC attribute specifies an image file to be used for the rule.

CDI Home Page

Line Break


<BR>
(HTML 3.2 Only) <BR CLEAR>
(HTML 3.2 Only) <BR CLEAR="type">

The line break tag breaks the current line of text. It's not necessary inside a PRE element. There is no </BR> tag. The CLEAR attribute type can be LEFT to break until there is nothing to the left, RIGHT for the right side, all for break until both sides are clear, and NONE for a normal break.

CDI Home Page

Paragraph


<P> text
<P> text </P>
(HTML 3.2 Only) <P ALIGN=alignment> text
(HTML 3.0 Only) <P NOWRAP> text

The paragraph tag starts a new paragraph, equivalent to two BR tags. The </P> tag is optional if the tag is only to insert space between two paragraphs, but vital when attributes (for example, ALIGN="center") are to apply to the whole paragraph. The ALIGN attribute can be one of LEFT, RIGHT, or CENTER. The NOWRAP attribute will make it so lines are only broken at the <BR> tag.

CDI Home Page

Plain Text


<PLAINTEXT> text </PLAINTEXT>

The plain text tag defines text that should be shown in a fixed width font with the line breaks and other whitespace specified by the page author. There is no need to use <BR> tags to indicate line breaks -- line breaks in the source will be displayed by the browser. In addition multiple spaces will be displayed as multiple spaces. HTML tags are not rendered..

CDI Home Page

Preformatted Text


<PRE> text </PRE>
<PRE WIDTH=
width> text </PRE>

The preformatted text tag defines text that should be shown in a fixed width font with the line breaks and other whitespace specified by the page author. There is no need to use <BR> tags to indicate line breaks -- line breaks in the source will be displayed by the browser. In addition multiple spaces will be displayed as multiple spaces. Typically used for several lines of program code or for poetry. The width attribute specifies the maximum number of characters per line.