Fonts and Text Styles

WARNING! You really shouldn't use the <font></font> tags once you understand HTML better and after you learn CSS (which we'll explain a little later). However, since you're just starting to learn HTML, go ahead and use them for now.

As you know, when writing HTML tags, you are giving instructions to the web browser on just how you want your web page to look. If you don't give specific instructions, the web browser will assume a few things. To explain, when you type in your text between the body tags, the web browser assumes that you want that text to be displayed a certain size because you haven't told it any differently. In other words, the web browser will assume a default value of 3, which is the size of the text that you are reading right now. However, you can make your words bigger or smaller by just giving more specific instructions to the web browser.

So, to change the font size, first of all, you are going to need a pair of font tags: <font> and </font>. Next, you will need an attribute, which will give the web browser some additional instructions. In this case, you want to change the font size. So, to tell the web browser just what size you want, you must use the SIZE attribute. Also, you need to tell the web browser one more thing - what size to make the font. To do this, you simply tell the web browser a value.

Now, to put it all together, you need to put both the attribute and the value inside the start font tag:

Woo-Hoo! <font
red arrow pointing up
start tag
size=
red arrow pointing up
attribute
"6">
red arrow pointing up
value
I'm </font>
red arrow pointing up
end tag
learning HTML!

Here is what it will look like when you type it out:

<html>
<head>
<title> Learning HTML </title>
</head>
<body>
Woo-Hoo! <font size="6"> I'm </font>learning HTML!
</body
</html>

In this example, the tags, attribute, and value are simply telling the the web browser that"I want the font to be size 6."

Wondering just what size is 6 anyways? Good question. Here is the different sizes that you can use:

1 2 3 4 5 6 7
Also, looking back at the examples, notice that I put the value in quotation marks ("6"). So, be careful when you are typing.

Ready to learn more about Fonts and Text Styles? right arrow

This resource originally created by Deborah Dunk.
Revised and edited by Michael Galloway in 2005 & in 2006.