Logo Code X Community

Lesson 4: Font Tags & Special Characters

In this lesson, you’ll learn how to use the old HTML <font> tag and how to display special characters using HTML character codes.

Using the <font> Tag

The <font> tag is used to change the color, size, and face of text. Although it's now deprecated in modern HTML, it's still good to know about it.

Example:


<font color="red">This is red text</font><br>
<font color="blue">This is blue text</font><br>
<font face="Arial">This text uses Arial font</font><br>
<font face="Courier New">Courier New font text</font><br>
<font size="1">Font size 1 (smallest)</font><br>
<font size="3">Font size 3 (default)</font><br>
<font size="7">Font size 7 (largest)</font><br>
<font color="green" size="5">Green text, size 5</font><br>
<font color="#FF00FF" face="Verdana">Magenta in Verdana</font><br>
<font color="orange" face="Georgia" size="4">Orange text with Georgia</font><br>
<font color="gray" size="2">Gray and smaller size</font><br>
<font color="black" face="Tahoma" size="6">Large black Tahoma text</font><br>
        

Special Characters in HTML

Some characters like <, >, or © can’t be typed directly in HTML. Use character codes instead:

Character Code
<&lt;
>&gt;
&&amp;
"&quot;
'&apos;
©&copy;
®&reg;
&euro;
£&pound;
¥&yen;
¢&cent;
 &nbsp;
&trade;
§&sect;
°&deg;
&para;
&bull;
&hellip;
·&middot;
«&laquo;