0% found this document useful (0 votes)
14 views1 page

HTML Font Customization Guide

The document explains the importance of fonts in web design for enhancing user experience and readability. It details the use of the HTML <font> tag, including its attributes for setting font size, face, and color, along with examples. Additionally, it highlights the potential issue of font availability on different user systems.

Uploaded by

kanikahanda23004
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views1 page

HTML Font Customization Guide

The document explains the importance of fonts in web design for enhancing user experience and readability. It details the use of the HTML <font> tag, including its attributes for setting font size, face, and color, along with examples. Additionally, it highlights the potential issue of font availability on different user systems.

Uploaded by

kanikahanda23004
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

HTML Fonts

Fonts play a very important role in making a website more user friendly and increasing content
readability. Font face and color depends entirely on the computer and browser that is being used to
view your page but you can use HTML <font> tag to add style, size, and color to the text on your
website. You can use a <basefont> tag to set all of your text to the same size, face, and color.

The font tag is having three attributes called size, color, and face to customize your fonts. To change any
of the font attributes at any time within your webpage, simply use the <font> tag. The text that follows
will remain changed until you close with the </font> tag. You can change one or all of the font attributes
within one <font> tag

The Attributes of <font> tag:

 Set Font Size


You can set content font size using size attribute. The range of accepted values is from 1(smallest) to
7(largest). The default size of a font is 3. i.e <font size = "-1">Font size demofont><br />

 Setting Font Face


You can set font face using face attribute but be aware that if the user viewing the page doesn't have
the font installed, they will not be able to see it. Instead user will see the default font face applicable to
the user's computer. i.e. <font face = "Times New Roman" size = "5">Times New Roman</font>

 Setting Font Color


You can set any font color you like using color attribute. You can specify the color that you want by
either the color name or hexadecimal code for that color. i.e.

 <font color = "#FF00FF">This text is in pink</font><br />


 <font color = "red">This text is red</font>

Example
<html>

<head>
<title>Setting Font Color</title>
</head>

<body>
<font color = "#FF00FF" size=45>This text is in pink</font><br />
<font color = "red" face=” Algerian, Arial Black, Broadway” size=+5>This text is red</font>
</body>
</html>

You might also like