TheDeveloperBlog.com

Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

HTML font Tag

HTML font Tag with html tutorial, tags, anchor, img, div, entity, textarea, marquee, p tag, heading tag, h1, h2, table, formatting, attribute, elements, ol, ul, Input Types, block element tag, inline element tag, html tags, phrase tag, head, body, form, lists, symbols etc.

<< Back to HTML

HTML <font> tag (Not Supported in HTML5)

HTML <font> tag is used to define the font style for the text contained within it. It defines the font size, color, and face or the text in an HTML document.

NOTE: Do not use HTML <font> tag as it is deprecated in HTML5, so you can use CSS properties to change the font size, face, color, etc.

Syntax

<font size=" " color=" " face=" "> Content....</font>

Following are some specifications about the HTML <font> tag

Display Inline
Start tag/End tag Both Start and End tag
Usage Font Style

Example 1

<!DOCTYPE html>
 <html>
 <head>
 <title>Font Tag</title>
 </head>
 <body>
 <h2>Example of font tag</h2>
 <p>This is normal text without any font styling</p>
  <p>
	<font color="blue">Text with normal size and default face</font>
  </p>
  <p>
	<font size="5" color="green">Text with Increased size and default face</font>
  </p>
  <p>
	<font color="red" face="cursive">Text with Changed face</font>
  </p>
</body>
</html>
Test it Now

Output:

HTML font tag

Using CSS

The same effect can be achieved using CSS properties as in below example:

<!DOCTYPE html>
 <html>
 <head>
 <title>Font Tag</title>
 </head>
 <body>
<h2>Change font using CSS</h2>
 <p>This is normal text without any font styling</p>
 <p style="color: blue;">Text with normal size and default face</p>
 <p style="font-size: 25px; color: green;">Text with Increased size and default face </p>
 <p style="font-family: cursive; color: red;">Text with Changed face</p>
</body>
</html>
Test it Now

Output:

HTML font tag

Attribute

Tag-specific attribute

Attribute Value Description
colod rgb(X,X,X)
#xxxxx
color_name
It specifies the color of the content. (Not Supported in HTML5)
face font_family It specifies the typeface of the content. (Not Supported in HTML5)
size number It specifies the size of the content. (Not Supported in HTML5)

Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<font>YesYesYesYesYes
Next TopicHTML footer Tag




Related Links:


Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf