Lesson 4

Now we've got a basic document, and we've got everything ready to put some text on it. Anything you type between the body tags will appear as text on the web page. Let's take a look at a few tags you can use to control how that text looks on the page.

<P> (closing tag not required)
This is the new paragraph tag.

This is a new paragraph.It will start a new line, with a blank space between it and the previous paragraph. The only attirbute is ALIGN=alignment, used to align the paragraph to the left, center, or right.

<BR> (closing tag not required)
This does a line break.
This is a line break. It's basically the same as <P> except there is no space in between it and the previous line.

<CENTER></CENTER>

This center's everything between the tags.

<U></U>
Underlines text.

<B></B>
Boldface text.

<STRIKE></STRIKE>
Strikethrough text.

<I></I>
Italic text.

<SUP><SUPI>
Creates a superscript

<SUB></SUB>
Creates a subscript

<DIV ALIGN="right"></DIV>

This will align text to the right side of the page,also works for left.

<H#></H#>
This is the heading tag. There valid values are H1-H6. I've done some speical tricks on this web page, so these are probably not the same headings you will get...

This is a H1


This is a H2


This is a H3


This is a H4


This is a H5

This is a H6

<HR> (Closing tag not allowed)
This creates a horizontal rule across the page. Options are listed below.

WIDTH=# or WIDTH=#%

Sets the width of the rule, either in pixels, or %. Default is 100%.
SIZE=#

Sets the thickness of the rule, in pixels.
ALIGN=alignment

Aligns the rule, either left, right, or center.
NOSHADE

This turns off the default rule style which has a 3D recessed look.

COLOR=color

This will change the color of the rule. It currently only works in IE4. If you want to simulate a colored rule, your best bet is to make an image that is about 20 pixels wide, and however thick you want it to be. Then use an image tag like this <IMG SRC=rule.gif HEIGHT=whatever WIDTH=100%> This will cause you image to be stretched out the entire width of the page.

<OL><LI></LI></OL>
This creates an ordered (numbered) list.

<OL>
<LI>Line 1</LI>
<LI>Line 2</LI>
</OL>
  1. Line 1
  2. Line 2

<UL><LI></LI></UL>
Creates an unordered (bulleted) list.

<UL>
<LI>Line 1</LI>
<LI>Line 2</LI>
</UL>
  • Line 1
  • Line 2

You can choose different types of lists with the TYPE=style attriute. Style's are listed below.
Type Numbering style
1 Arabic numbers1, 2, 3, ...
a lower alphaa, b, c, ...
A upper alphaA, B, C, ...
i lower romani, ii, iii, ...
I upper romanI, II, III, ...

Back: Lesson 3-The Body and Font Tag

Next: Lesson 5-Pictures and Linking

[Introduction] [Lesson 1] [Lesson 2] [Lesson 3] [Lesson 4] [Lesson 5] [Lesson 6] [More Resources]


Send questions or comments about this site to website@socrates.math.ohio-state.edu Copyright © 1998, Calculus&Mathematica