|
Section One - Getting Started: Lesson 2-5: Text Formatting
There are a number of tags you can use to format text on your web pages.
Here are some basic text formatting tags and examples of what they do.
The HTML in the left column is what you would type into your source file.
The right column shows how each would display in a browser:
Source HTML |
| Displays as: |
This is bBold/b text. |
= |
This is Bold text. |
This is iItalic/i text. |
= |
This is Italic text. |
This is uUnderlined/u text. |
= |
This is Underlined text. |
This is bigBig/big text. |
= |
This is Big text. |
This is smallSmall/small text. |
= |
This is Small text. |
This is Supersupscript/sup text. |
= |
This is Superscript text. |
Bold and italic are the two tags you will probably find most useful.
Try to avoid underlining as much as possible. Remember that on web pages links are underlined.
Using underlining for words which are not links can be confusing for your readers.
The big and small tags make text slightly bigger or smaller than the normal text size.
If you only need three sizes of text - small, normal and big - then these tags may be all you need.
However, there is another way to change the size of text which gives you more choice of sizes.
(That method will be covered in the next lesson.) You also can use more than one tag at a time,
but be sure to "nest" the tags inside one another, in order.
Practice:
Okay
, open your practice file with your text editor and add the red text:
html
head
titleMy First Home Page/title
/head
body bgcolor="##eeffff"
h1 align="center"HTML Tips and Tricks/h1
br
This is a sentence with spaces
between the words. The extra spaces are ignored.br
This sentence uses
space codes between the
words. brbr
p
You will find many helpful hints here on how to construct web pages.
Basic home page creation is not difficult. However, once you learn the basics,
you will want to try to do many things which you see on other people's pages on the Internet,
The tips on this page should help beginning web page authors to learn new tricks and techniques./p
This is bbold text/b.br
This is iitalic text/i.br
This is uunderlined text/u.br
This is bigbig text/big.br
This is smallsmall text/small.br
This is supersupscript/sup text.br
This text is biguibbig, bold, italic, and underlined/b/i/u/big.
brbr
/body
/html
|
Save your file, and look at it with your browser. To see what the result should look like, click here!
Review:
- The bbold/b, iitalic/i,
uunderline/u, bigbig/big,
smallsmall/small, supsuperscript
/sup tags are used for formatting text. Other text formatting tags you can use include:
strikestrikeout/strike,
ttteletype/tt,
subsubscript/sub, and
blink/blink.
- More than one formatting tag can be used at the same time, but tags should be nested in order from inside to outside.
- Underlining should be avoided because underlined text can be confused with links.
|