Horje
HTML <font> Tag

Not Supported in HTML5.

The <font> tag was used in HTML 4 to specify the font face, font size, and color of text.


What should Use Instead of HTML <font> Tag

Set the color of text (with CSS)
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<p style="color:red">This is a paragraph.</p>
<p style="color:blue">This is another paragraph.</p>

</body>
</html>

Output should be:

What should Use Instead of HTML <font> Tag

How to Set the font of text (with CSS)

See the Example.
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<p style="font-family:verdana">This is a paragraph.</p>
<p style="font-family:'Courier New'">This is another paragraph.</p>

</body>
</html>

Output should be:

How to Set the font of text (with CSS)

How to Set the size of text (with CSS)

See the Example
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<p style="font-size:30px">This is a paragraph.</p>
<p style="font-size:11px">This is another paragraph.</p>

</body>
</html>

Output should be:

How to Set the size of text (with CSS)





Category:
Web Tutorial
Sub Category:
HTML Tag
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference