Changing Font Color/Face/Size
Changing the font color, face and size are all relatively simple, and are all contained within the same HTML
function. In order to just change the color, you can do the following:
<FONT COLOR="blue">This text will appear in blue</FONT>
This text will appear in blue
Within the color field you may name a color, as shown, or you may use the HEX code of the color, which is the preferred method, as seen below:
<FONT COLOR=" #0000FF">This will appear in blue</FONT>
This text will appear in blue
The color in hex code has a lot more ability and I would recommend that you use it so that you can have a unique website. The hex code of red then green and blue, all up to 255 but in hexadecimal code. Please note that not all monitors display all colors.
Changing the face of a font is also very simple and useful. You can change the face of the font to whatever font you wish, but be careful, if a user does not have that font installed on their computer, then it will just show the default font. You can change the face by using the following code:
<FONT FACE="Courier">This will have "Courier" font</FONT>
This will have "Courier" font
Because people may not have the specific font type that you want it is a good idea to have backup font types separating them by commas, as seen here:
<FONT FACE="BobsFont,Wingdings,Times New Roman,Times,Courier New">This is the text that it applies to</FONT>
This is the text that it applies to
You can change the font size using two basic methods. You can do it by using the size attribute, or by using the style attribute. The code for the size attribute:
<FONT SIZE="5">This is the text that it applies to</FONT>
This size of the font is 5
Using this method, you can change the font from 1 to 7. I would not recommend this method. You could also make the font change, compared to what it was right before as can be seen here:
<FONT SIZE="+2">This is the text that it applies to</FONT>
This is the text that it applies to
As you can notice the font size increased by two font sizes from what it was right before. You can go from -7 to +7, where the -7 decreases the font size by seven and the positive increases it by seven. Another method of changing the font size it by using the following:
<SMALL>The small text<SMALL>
The small text
<BIG>The big text<BIG>
The big text
The more commonly seen font size can be changed by using the font style attribute. You can use this code for modifying that:
<FONT STYLE="Font-Size:20px;">This is the text that it applies to</FONT>
This is the text that it applies to
By using this, you can easily modify the font size from 1 and on. this is what most programs and websites use as their font size.
Let us look at an exapmle using different font size's and colours to our text.
Example:
<HTML>
<HEAD>
<TITLE>Example Page</TITLE>
</HEAD>
<BODY>
<p><H2><FONT COLOR="blue">Rihanna ft Eminem – Love The Way You Lie Pt. 2 Lyrics
</FONT></H2></p>
<SMALL>Rihanna<br/><SMALL>
<FONT STYLE="Font-Size:20px;">
<FONT FACE="verdana">
On the first page of our story<br>
the future seemed so bright<br>
then this thing turned out so evil<br>
I don’t know why I’m still surprised<br>
even angels have their wicked schemes<br>
and you take that to new extremes<br>
but you’ll always be my hero<br>
even though you’ve lost your mind<br>
</FONT>
</FONT>
</BODY>
</HTML>
Result/Output:
No comments:
Post a Comment