Creating a Web Page V : Text Formatting and Lists

0 Conversations

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:

  1. first item
  2. second item
  3. third item
  4. etc



Bookmark on your Personal Space


Conversations About This Entry

There are no Conversations for this Entry

Entry

A669206

Infinite Improbability Drive

Infinite Improbability Drive

Read a random Edited Entry


Written and Edited by

Disclaimer

h2g2 is created by h2g2's users, who are members of the public. The views expressed are theirs and unless specifically stated are not those of the Not Panicking Ltd. Unlike Edited Entries, Entries have not been checked by an Editor. If you consider any Entry to be in breach of the site's House Rules, please register a complaint. For any other comments, please visit the Feedback page.

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more