HTMLforall

  HTML | PHP | Forum

HTML <font> tag

Syntax

<font> - </font>

Definition and Usage

The <font> tag specifies the font face, font size, and font color of text. The <font> tag is deprecated in HTML 4 in favor of style sheets.

Optional Attributes

Attribute Value Description
color rgb(x,x,x)
#RRGGBB
colorname
Defines the color of the text in the font element. Deprecated. Use styles instead
face list_of_fontnames Defines the font of the text in the font element. Deprecated. Use styles instead
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

Standard Attributes

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

For a full description, go to Standard Attributes.

Event Attributes

NONE

Deprecated Example

Source Output
<font size="4" color="green">
This is a size 4 green text.
</font>
<font size="1" color="blue">
The text is size 1 blue.
</font>
<font face="arial" size="7" color="red">
The text has a red color, size 7 and an arial font.
</font>
This is a size 4 green text. The text is size 1 blue. The text has a red color, size 7 and an arial font.

Home

Learn HTML
HTML Tutorial

HTML Reference
HTML by function
HTML by Alphabet

HTML events
HTML attributes
HTML color names

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

 

Copyright 2005-8 Sunilcare.  All Rights Reserved.
Comments or suggestions? Contact us.About us