There are several basic tags for formating objects on your webpage that you need
to know before you start. These tags will help you get started with designing the layout of your page.
The center tag, altough not offically part of the latest HTML standard, is still very useful.
This tag, <CENTER></CENTER>
, does just
what you think it might. It takes whatever text or object that you place between the opening and
closing tags and centers it. This tag was offically removed from the latest HTML standard because
all aligning of objects can be done through the align
attribute of the various tags. It is
still widely used and all browsers still support its use and will continue to support it for years
to come.
<CENTER>
This text gets centered
</CENTER>
Another important tag for designing your layout is the break line tag <BR>
.
This tag is different than most tags because it doesn't have a closing tag. Placing this tag in
your document adds a line break on your webpage.
Line 1<BR>Line2<BR>Line 3
Line 1
Line 2
Line 3
The paragraph break is similar to the line break. It is used to separate text into paragraphs
While there is technically a closing paragraph tag, it is rarely used <P></P>
.
Opening a new paragraph automatically closes the previous one (since you can't have a paragraph
within another paragraph). All the paragraphs in this tutorial are separated by paragraph tags.
This is paragraph 1<P>This is paragraph 2
This is paragraph 1
This is paragraph 2
Another common tag used for layout is the horizontal rule tag <HR>
.
This is another of the very few tags that doesn't have a closing tag. There are two main attributes
associated with this tag; width
sets the horizontal width of the of the line; size
sets the height of the line.
<HR WIDTH ="400" SIZE = "5">
The final layout tags I'll discuss here are the ordered <OL></OL>
and unordered lists <UL></UL>
.
These tags are used for creating lists with bullet points. In an unordered list regular bullet
points are used. In an ordered list numbers are used. Each bullet point is defined by another
tag within the list tags. This is the list item tag <LI>
.
This is another of the few tags in HTML that doesn't have a closing tag. Everything after the
list item tag and before the next list item tag or closing list tag is considered one bullet point.
<UL>
<LI> Unordered Bullet 1
<LI> Unordered Bullet 2
<OL>
<LI> Ordered Bullet 1
<LI> Ordered Bullet 2
</OL>
<LI> Unordered Bullet 3
</UL>
- Unordered Bullet 1
- Unordered Bullet 2
- Ordered Bullet 1
- Ordered Bullet 2
- Unordered Bullet 3