Tags
<!-->
<!DOCTYPE>
<a>
<abbr>
<acronym>
<address>
<applet>
<area>
<b>
<base>
<basefont>
<bdo>
<big>
<blockquote>
<body>
<br>
<button>
<caption>
<center>
<cite>
<code>
<col>
<colgroup>
<dd>
<del>
<dfn>
<dir>
<div>
<dl>
<dt>
<em>
<fieldset>
<font>
<form>
<frame>
<frameset>
<head>
<h1> - <h6>
<hr>
<html>
<i>
<iframe>
<img>
<input>
<ins>
<kbd>
<label>
<legend>
<li>
<link>
<map>
<menu>
<meta>
<noframes>
<noscript>
<object>
<ol>
<optgroup>
<option>
<p>
<param>
<pre>
<q>
<s>
<samp>
<script>
<select>
<small>
<span>
<strike>
<strong>
<style>
<sub>
<sup>
<table>
<tbody>
<td>
<textarea>
<tfoot>
<th>
<thead>
<title>
<tr>
<tt>
<u>
<ul>
<var>

Standard
Attributes
Events

The <font> tag


Definition and Usage

The <font> tag specifies the font face, font size, and font color of text.


Differences Between HTML and XHTML

The font element was deprecated in HTML 4.01.

The font element is not supported in XHTML 1.0 Strict DTD.


Tips and Notes

Tip: Use styles (instead of the <font> tag) to define the font face, font size, and font color of text.


Example

Source Output
<font size="3" color="red">
This is some text!
</font>
<font size="1" color="blue">
This is some text!
</font>
<font face="arial" color="red">
This is some text!
</font>
This is some text! This is some text! This is some text!


Optional Attributes

DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.

Attribute Value Description DTD
color rgb(x,x,x)
#xxxxxx
colorname
Defines the color of the text in the font element. Deprecated. Use styles instead TF
face list_of_fontnames Defines the font of the text in the font element. Deprecated. Use styles instead TF
size A number from 1 to 7.
If basefont is specified you can specify a number from -6 to 6
Defines the size of the text in the font element. Deprecated. Use styles instead TF

Standard Attributes

id, class, title, style, dir, lang, xml:lang

For a full description, go to Standard Attributes.

Event Attributes

NONE