Creating a Web Page V : Text Formatting and Lists
Created | Updated Sep 15, 2002
Please refer to previous entries in the "Creating a Web Page" series:
Text formatting
Tags in HTML can have many "attributes", or customizable features. Take, for instance, the paragraph tag. You can specify how you want the tag aligned: LEFT, RIGHT, or CENTER.
<P ALIGN="LEFT"> blah blah blah </P><P ALIGN="RIGHT"> blah blah blah </P>
<P ALIGN="CENTER"> blah blah blah </P>
In a similar vein, if you want to quote a largish passage from some author you can use the BLOCKQUOTE tag. This will justify the text (center it, and make all the text line up evenly on both sides so you have a solid block of text instead of getting a jagged right edge).
<BLOCKQUOTE> yadda yadda yadda </BLOCKQUOTE>blahblahblahyakyakyaketcetcetcyaddayaddayaddachatterchatterchatter. blahblahblahyakyakyaketcetcetcyaddayaddayaddachatterchatterchatter. blahblahblahyakyakyaketcetcetcyaddayaddayaddachatterchatterchatter. blahblahblahyakyakyaketcetcetcyaddayaddayaddachatterchatterchatter. blahblahblahyakyakyaketcetcetcyaddayaddayaddachatterchatterchatter. blahblahblahyakyakyaketcetcetcyaddayaddayaddachatterchatterchatter. blahblahblahyakyakyaketcetcetcyaddayaddayaddachatterchatterchatter.
Lists
While you could do lists with just paragraphs and line breaks, HTML has tags that will allow you to get a much nicer-looking list with very little effort.
Unordered lists are ones that just use bullets for each item in the list.
Sample HTML:
<UL><LI> first item </LI>
<LI> second item </LI>
<LI> third item </LI>
<LI> etc </LI>
</UL>
Result:
- first item
- second item
- third item
- etc
Ordered lists use either upper- or lowercase letters, Roman or Arabic numerals to count off the different items. When you specify the type, simply put either "1","i","I","a", or "A" to show which kind of counting you want to use. I'll choose a numbered one with Arabic numerals:
Sample HTML:
<OL TYPE=1><LI> first item </LI>
<LI> second item </LI>
<LI> third item </LI>
<LI> etc </LI>
</OL>
Result:
- first item
- second item
- third item
- etc