HTML Basics

By Deborah Lagarde

Lesson 2: Text, font, background, color, list tags

Dress up your index page with text tags, font tags, font colors, background colors, block quotes, lists.

More basic tags for text

Review, and text alignment tags

Lesson 2 will seem to be less complicated than lesson 1 was; it will only cover one chapter in the book (Chapter Three) and will consist mainly of tags and what they mean. To get a better picture of this lesson, make sure you read Chapter 3--it's easier to visualize the code by looking at the pictures in the book.

So let me review with you the basic text tags:

  • <b> and </b> opens and closes bold text;
  • <i> and </i> opens and closes italic text;
  • <u> and </u> opens and closes underlined text;
  • <strike> and </strike> opens and closes strikethrough text.
  • <blink> and </blink> makes your text "blink" in and out but is only effective in Netscape.

Supposing you want to combine tags, say, a bold and italic text: If you use the <b> tag, then the <i> tag, make sure you close your tags in REVERSE fashion, with </i> tag, then </b> tag:

<b><i>your text</i></b>.

Now let's review the tags that align your text:

<center> and </center> open and close text that is centered (very useful for headlines, for instance, or titles). In Lesson 1 I did not go into the use of the "align" tags (though you've already read about it in Chapter 2 of the text) to put the text either at the left or the right margin, primarily because if you are putting text on the left, it will go there by default without the "align left" tag. In fact the only times I use "align" tags is to place graphics on pages where I am wrapping text around a picture (see Chapter 4 and Lesson 3 on graphics), or when creating tables (see Chapter 7 and Lesson 5).

I have never had to use the <sup> and </sup> tags for superscripting, nor the <sub> and </sub> tags for subscripting because when I footnote articles I supply the links as I go along, thus I don't use "footnote"--like attributes. However, the tags do work, so use them if you have to (see the pictures on page 28 of the text).

Print this Page Print this page


1  2  3  4   Next Page


Lessons

Lesson 1: Getting started on your Web page
Lesson 2: Text, font, background, color, list tags
• More basic tags for text
Lesson 3: Adding Images
Lesson 4: Links