HTML Font

By configuring your website’s html font family, you can make it even more attractive, readable and structured. By default your website‘s font family can be anything. But by configuring it according to your website, you can also use any other font family. You can also change the font color as well. HTML <font> tag provides for configuring Fonts.

Example

<!DOCTYPE html>
<html>
<title> font </title>
<body>

<font face="Arial, Helvetica, sans-serif" color="blue" size="4">
Hello World !
</font>

</body>
</html>

Output

Hello World !

You can apply this tag to a paragraph and you can apply it to a particular text in a paragraph. The <font> tag has three attributes.

  • font-size
  • font-face
  • font-color

HTML font-size

With this attribute you can change font size. Font size is given in numbers.

Example

<!DOCTYPE html>
<html>
<body>

<p><font size="5">Web design encompasses many different skills and disciplines in the production and maintenance of websites. The different areas of web design include web graphic design; interface design; authoring, including standardised code and proprietary software; user experience design; and search engine optimization.</font></p>

</body>
</html>

Output

Web design encompasses many different skills and disciplines in the production and maintenance of websites. The different areas of web design include web graphic design; interface design; authoring, including standardised code and proprietary software; user experience design; and search engine optimization.

HTML font-face

Font attribute is changed by this attribute. You define the html font family you want in the inverted commas.

Example

<!DOCTYPE html>
<html>
<body>

<p><font face="verdana">Google LLC is an American multinational technology company that specializes in Internet-related services and products, which include online advertising technologies, search engine, cloud computing, software, and hardware. It is considered one of the Big Four technology companies, alongside Amazon, Apple and Facebook.</font></p>

</body>
</html>

Output

Google LLC is an American multinational technology company that specializes in Internet-related services and products, which include online advertising technologies, search engine, cloud computing, software, and hardware. It is considered one of the Big Four technology companies, alongside Amazon, Apple and Facebook.

font-color

This attribute is used to change the color of the font. You can write a color hex code or you can also name the color.

Example

<!DOCTYPE html>
<html>
<body>

<p><font color="red">Facebook, Inc. is an American online social media and social networking service company. It is based in Menlo Park, California. It was founded by Mark Zuckerberg, along with fellow Harvard College students and roommates Eduardo Saverin, Andrew McCollum, Dustin Moskovitz and Chris Hughes</font></p>

</body>
</html>

Output

Facebook, Inc. is an American online social media and social networking service company. It is based in Menlo Park, California. It was founded by Mark Zuckerberg, along with fellow Harvard College students and roommates Eduardo Saverin, Andrew McCollum, Dustin Moskovitz and Chris Hughes