Just like a word processor, HTML can tell a web browser to display certain portions of text in Italic or Bold Style or even a combination.
After this lesson, you will be able to:
HTML offers several tags for adding style to your text. Just remember to be judicious and consistent in the use of styles; too much can make the text uncomfortable to read...
Style tags | |||
---|---|---|---|
HTML | Result | ||
<b>This is Bold...</b> <i>This is Italic...</i> <tt>This is Typewriter...</tt> |
| ||
Note how you can combine the style tags as long as they are correctly nested, the italic tags are both within the bold tags. Note also, that the order does not matter. | |||
HTML | Result | ||
<i><b>This is Bold AND Italic</b></i> <b><i>And So is This</i></b> |
| ||
Furthermore, you can also add style to the text that appears in heading tags. Note how the different style tags are opened and closed around the words they style and how the heading tags surround the whole text for the heading. | |||
HTML | Result | ||
blah blah blah <h2><i>New</i> and <tt>Improved!</tt></h2> blah blah blah |
|
Note: If you do not have the working document from the previous lesson, download a copy now.
Follow these steps to apply style tags to your HTML document.
<b>volcano</b>
<p> Volcanoes have been a part of earth's history long before humans. Compare the history of human beings, a few million years in the making, to that of the Earth, over four <b><i>billion</i></b> years in the making.
The study of volcanoes, or <tt>Volcanology</tt>, includes many odd terms.
Look at an example that shows these changes. It is important when using style tags to properly terminate the tag(s) with the proper </> tag. Otherwise, all succeeding text will inherit this text style. It can look bizarre.
Try using the style tags for bold, italic, and typewriter to the text of your own web page. See if you can successfully combine styles... that are pleasing to read.
How to put together lists of items, in both numbered and bulleted fashion.
Writing HTML: Lesson 5: Doing it with Style
©1994-2002
Maricopa Center for Learning and Instruction (MCLI)
Maricopa Community Colleges
Questions? Comments? Visit our feedback center
URL: http://www.mcli.dist.maricopa.edu/tut/tut5.html