Make your own free website on Tripod.com

LESSON 2: "Prettier" text

  1. Element BR (Line Break).
  2. Element P (Paragraph).
  3. Elements H1, H2, H3, H4, H5, H6 (Headings).
  4. Element B (Boldface).
  5. Element I (Italic).
  6. Element U (Underlined).
  7. Element PRE (Preformatted Text).
  8. Element CENTER.
  9. Examples.


1. Element BR (Line Break).

\..........Description

The BR element forces a break in the current line of text.
BR is needed because a line break in the HTML file does not cause the browser to display a line break.

\..........Syntax

   <BR>

BR has no end tag.

\..........Examples to see

Example 1 demonstrates use of the BR element. Go to Top


2. Element P (Paragraph).

\..........Description

The P element defines a paragraph, preceded and followed by a blank line.

\..........Syntax

<P ALIGN="left"|"center"|"right">
.....
</P>


The end tag for P is optional when the paragraph is followed by another paragraph. If </P> is omitted, the paragraph is not followed by a blank line.

\..........Attributes

Attribute Description
ALIGN= "left"
"center"
"right"
Specifies the horizontal alignment of the paragraph.
The default is left.

\..........Examples to see

Examples 2 and 3 demonstrate P attributes.
Go to Top


3. Elements H1, H2, H3, H4, H5, H6 (Headings).

\..........Description

H1, H2, H3, H4, H5 and H6 elements are used to make headings, which are usually rendered in a large, bold font.
H1 specifies the largest font, H6 - the smallest.

\..........Syntax

<H1 ALIGN="left"|"center"|"right">
.....
</H1>
<H2 ALIGN="left"|"center"|"right">
.....
</H2>
<H3 ALIGN="left"|"center"|"right">
.....
</H3>
<H4 ALIGN="left"|"center"|"right">
.....
</H4>
<H5 ALIGN="left"|"center"|"right">
.....
</H5>
<H6 ALIGN="left"|"center"|"right">
.....
</H6>

\..........Attributes

Attribute Description
ALIGN= "left"
"center"
"right"
Specifies the horizontal alignment of the text contained in Heading.
The default is left.

\..........Examples to see

Example 4 demonstrates H1-H6 attributes.
Go to Top


4. Element B (Boldface).

\..........Description

The B element suggests that text be rendered as bold text.

\..........Syntax

<B>.....</B>

\..........Examples to see

Example 5 demonstrates use of the B element.
Go to Top


5. Element I (Italic).

\..........Description

The I element suggests that text be rendered as italic text.

\..........Syntax

<I>.....</I>

\..........Examples to see

Example 5 demonstrates use of the I element.
Go to Top


6. Element U (Underlined).

\..........Description

The U element suggests that text be rendered as underlined text.

\..........Syntax

<U>.....</U>

\..........Examples to see

Example 5 demonstrates use of the U element.
Go to Top


7. Element PRE (Preformatted Text).

\..........Description

The PRE element contains preformatted text. Visual browsers should render preformatted text in a fixed-pitch font, should not collapse white space, and should not wrap long lines.

\..........Syntax

<PRE>.....</PRE>

\..........Examples to see

Example 6 demonstrates use of the PRE element.
Go to Top


8. Element CENTER.

\..........Description

The CENTER element defines a block whose contents are centered horizontally on visual browsers.

\..........Syntax

<CENTER>.....</CENTER>

\..........Examples to see

Example 7 demonstrates use of the CENTER element.
Go to Top


9. Examples.

Choose an example and move below the text box to see the HTML code.

Example 1: Inserting line break (BR).
Example 2: Inserting new paragraph (P).
Example 3: Aligning paragraphs.
Example 4: Using Headings (H1-H6).
Example 5: Making text bold, italic and underlined.
Example 6: Arranging text (PRE).
Example 7: Centering text (CENTER).
Preview
Go to Top