-
Start your text editor and type
<html>
<head>
<title>Grier Summer Camp</title>
</head>
<body>
Located in the <strike>heart</strike> of
<i>Rockville</i>, <u>Maryland</u>, the
<b>Grier Summer Camp</b> <s>is an</s> attractive
tourist setting aimed at entertaining and supporting youth activities
during their <b><i>summer vacation</i></b>. Our
youth programs and activities are as intense and stimulating as
E=mc<sup>2</sup> yet as lively as
H<sub>2</sub>O.
</body>
</html>
|
-
Save the file as exo3.htm in the C:\htmltutorial folder.
-
As an example of changing or specifying a font, change the word attractive as follows:
<font face="Arial">tourist</font>
|
-
Save the file and preview it in your browser browser.
Return to your text editor
-
To see an example of providing a list of fonts to the browser, make the following change:
<font face="Verdana, Tahoma, Helvetica">entertaining and supporting</font>
|
In this case, the browser will first check whether the visiting computer
has the Verdana font, if it doesn't, then the browser will check
whether Tahoma is available; if not, "what about Helvetica?"; if none of
these fonts is installed, then the browser will use its default.
-
Save the file. Preview it in the browser. Bring back Notepad.
-
You can also control a font's size using one of 7
sizes. The font size is controlled using the <font> tag. Once
again, inside of the <font> tag, you specify the size using the
size attribute, like this <font size="Size">. The sizes available
in HTML are 1, 2, 3, 4, 5, 6, and 7.
For an example, make the following change on the file:
<font size="5">activities</font>
|
-
Save the file. Preview it in the browser. Bring back Notepad
-
HTML also allows you to control the color
display of a character, a word, or a group of words. You use the color
attribute of the <font> tag to set a font's color, like this
<font color="Font Color">. There are two ways you can set a color
with the color attribute: using its recognized name or its HTML
code.
Almost all the color names that you know can be recognized by the
browser. Examples include: green, red, blue, white, black, orange,
yellow, navy, pink, gray, lime,
lightgreen, light blue, etc. There are many others.
The other option, which is safer but unpredictable for a beginning webmaster, is to use a combination of letters from
a to f and digits from
0 to 9 to specify a color. To use this code, you precede it with #.
Here are two examples. Make the following changes:
1st change: |
<font color="red">attractive</font> |
2nd change: |
<font color="#0000ff">setting</font> |
The first color is simply specified as Red. The second color is blue but using its HTML tag.
-
Save the file. Preview it in the browser. Bring back Notepad.
-
You can combine two or three of the font
attributes in the same <font> tag. After starting the tag, list
each of the desired attributes with its corresponding desired feature.
There is no rule as to how the attributes should be listed.
Here are some examples. Click to the left of </body>
-
Press Enter to create an empty line. Starting on the new empty line, type:
<font face="Garamond, Georgia" size="2">Seven Locks</font>
|
Press Enter and type:
<font color="fuchsia" face="Verdana, Tahoma">Havell Barrow</font>
|
-
Press Enter and type:
<font size="4" color="#FFFF00" face="Arial">Coolfront Island</font>
|
-
Save the file. Preview it in the browser. Bring back Notepad.
-
If the whole document is using a particular font
color, you can include its attributes in the <body> tag, and this
color will impact everything. Fortunately, any section that has a
particular font color will not be impacted, it will keep its set color.
To see how this is done, change the body tag to look as follows:
-
Save the file. Preview it in the browser

-
Now, you can close everything
|
No comments:
Post a Comment