|
Virginia's HTML—Text and Lists |
| This is a sentence that I typed into my HTML source file using my text editor. |
| This is a sentence that I typed into my HTML source file using my text editor. |
Try resizing your browser window and watch the text wrap in the boxes.
Now lets get on to paragraphs. Here's a sample of how not to do it.
|
This is a poem. About HTML.
Learn it now, and. |
That's what I typed into my HTML file. But this is what it will look like when the browser wraps it.
| This is a poem. About HTML. Learn it now, and. It will serve you well. |
OK? So how did I make it look like a poem? I used two tags that don't have matching </TAG>s. They stand alone.
|
This is a poem.<BR> About HTML. <P> Learn it now, and.<BR> It will serve you well. |
So you have to remember as you type your content that paragraphs need to be separated with <P> tags. Or, if you're like me, you happily forget the <P> tags until you fire up the the page in your browser. Then you say, "Oh [explitive not appropriate for younger readers]" and go back and put the <P> tags in.
Now to be thorough, I'll mention that there is a <P> tag that uses a matching </P> tag. You use it to force non-left alignment, this way.
|
<P ALIGN="center">This is a poem<BR> About HTML.</P>
<P ALIGN="right">Learn it now, and.<BR> |
That comes out looking like this.
|
This is a poem Learn it now, and. |
Before you go on to lists, try adding some content to your virginia.html file. Use <P> tags to separate your paragraphs. (Or forget the <P> tags until you view your page in your browser. Then you can say, "Oh [explitive]" and go back and put the <P> tags in.)
|
Virginia cooks! <UL> <LI>Coffee</LI> <LI>Popcorn</LI> <LI>Cookies</LI> <UL> |
Virginia cooks!
|
Note that you don't need a <P> tag—the list separates itself from surrounding text. Also, the style of indenting the list items within the <UL> and </UL> tags doesn't mean anything to the browser, but it makes the HTML much easier to read (and to add new items at a later date).
You could have written it this way:
| <UL><LI>Coffee</LI><LI>Popcorn</LI><LI>Cookies</LI></UL> |
That would come out just the same in the browser, but it would be quite a mean trick to play on the person who comes along later wanting to update the list. That person might be you, so be kind to yourself.
|
Virginia cooks! In order of skill required, she makes: <OL> <LI>Cookies</LI> <LI>Coffee</LI> <LI>Microwave Popcorn</LI> </OL> |
Virginia cooks! In order of skill required, she makes:
|
You might want different numbering. For that the <OL> tag supports the TYPE=? attribute. The default type is "1", for arabic numerals. Here are all the options.
| <OL TYPE="1"> | <OL TYPE="A"> | <OL TYPE="a"> | <OL TYPE="I"> | <OL TYPE="i"> |
|
|
|
|
|
|
Virginia is: <UL> <LI>A student at SUNY Albany</LI> <LI>An avid tennis player</LI> <LI>A great cook! <UL> <LI>Coffee</LI> <LI>Popcorn</LI> <LI>Cookies</LI> </UL> </LI> <UL> |
Virginia is:
|
Now you've got text and lists added to your toolkit. Along with headings and color you should be able to produce a decent virginia.html file. Put one up at www.virginiarinehart.com and I'll explain how to expand it to a multi-page, hyperlinked website.