Changing text
Now let's change the font (the way the text looks) to something more interesting. We can do this with the <font> tag, but using the <font> tag by itself won't do anything; we need to use the tag's attributes to change specific things about the text. An attribute is something added to an HTML tag to give the browser more information about how the content between that tag and its end tag should be displayed. The <font> tag, for example, has attributes like face, color, and size. Let's change the face, or style, of the text. As with the <h1> tag, we also wrap the <font> tag around the text:
<p> <h1> <font face="Courier"> I love animals! </font> </h1> </p>
  I love animals!
Notice that the attribute only needs to go in the start tag. As you can also see in the HTML code above, the face--or type--of font we used is called "Courier" and it's very different from the rest of the text on this page. Try changing the font's face in the Playground. Some popular fonts are: Arial, Comic Sans MS, Georgia, Impact, Lucida Console, Tahoma, Times New Roman, and Verdana. Experiment to find out which ones you like best!
|