Tutorials - HTML - Lesson 4
The next step is to add some character to your text.
Step 4 - More Text Formatting
You may want to make some text bold, Italicised, Underlined,
or even Strikethrough. Here's how you do it.
<html>
<head>
<title>My first Web Page - Text Formatting</title>
</head>
<body bgcolor="#FFFFFF">
<p><font face="comic sans ms" size="3"
color="#D2D2D2">My teacher always told me to use
<b>paragraphs</b></p>
<p>I wonder <i>whether</i> she was right or not<br>
I <u>don't</u> think she was you know!<br>
No She really <strike>wasn't</strike>!
</font>
</body>
</html>
Run the example above to see what happens, basically the <b></b>
turn bold text on/off, <u></u>
does underline, <i></i>
does Italics and the <strike></strike>
controls strikethrough. Yeay!
HTML also has some helpful built in heading styles that can be accessed
by using the <h></h> tags, these range from h (heading) 1
through 6 with one being the largest heading. Lets see what happens when
we add one to our page:
<html>
<head>
<title>My first Web Page - Text Formatting</title>
</head>
<body bgcolor="#FFFFFF">
<h1>My First Web Page</h1>
<p><font face="comic sans ms" size="3"
color="#D2D2D2">My teacher always told me to use
<b> paragraphs</b></p>
<p>I wonder <i> whether</i> she was right or not<br>
I <u>don't</u> think she was you know!<br>
No She really <strike>wasn't</strike>!
</font>
</body>
</html>
Now you'll see that the heading is in the default font colour and
style, how do you think you can make the heading the same colour and style
as the rest of the page? That's right! Move the font tag! Clever you!
<html>
<head>
<title>My first Web Page - Text Formatting</title>
</head>
<body bgcolor="#FFFFFF">
<font face="comic sans ms" size="3"
color="#D2D2D2">
<h1>My First Web Page</h1>
<p>My teacher always told me to use <b>
paragraphs</b></p>
<p>I wonder <i> whether</i> she was right or not<br>
I <u>don't</u> think she was you know!<br>
No She really <strike>wasn't</strike>!
</font>
</body>
</html>
Now that you have learnt the basics of text and page formatting, we'll
move on to the next important technique, Step 5
- adding links.
back
|