Fonts

Web Fonts

Web fonts are fonts that are specifically designed for use on the web. They are typically stored as font files on a web server and then downloaded to the user's computer when they visit a website. This allows websites to use custom fonts that are not installed on the user's computer by default.

There are two main types of web fonts:

  • Embedded fonts: These fonts are embedded directly into the HTML code of a web page. This means that the font file is downloaded along with the page, and the user's browser displays the text using the embedded font.
  • Linked fonts: These fonts are linked to from the HTML code of a web page. This means that the font file is downloaded separately from the page, and the user's browser displays the text using the linked font.

Advantages of using web fonts:

  • Improved readability: Web fonts can be chosen to improve the readability of text on a website.
  • Enhanced branding: Web fonts can be used to create a consistent brand identity across a website.
  • Increased engagement: Web fonts can be used to create a more engaging and visually appealing website.

Popular web font services:

  • Google Fonts: A large library of free and open-source fonts that can be used on websites.
  • Adobe Typekit: A subscription-based service that provides access to a wide range of fonts from Adobe and other type foundries.
  • Font Awesome: A library of vector icons that can be used as fonts.

Using web fonts:

  • To use web fonts on a website, you need to include a <link> tag in the <head> section of your HTML code. The <link> tag should point to the font file or the URL of the font service. You also need to specify the font family name in your CSS code.
  • <head> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,700"> </head>