i

Learn HTML and CSS in 10 Days

Using Web-Safe Fonts

The tablets, computers, smart-phone, and other web surfing devices comes with fonts that are already installed in them. As they are present in all devices, we can use these fonts on our website as it will be processed smoothly in all of them. These fonts are popularly called as "web-safe fonts." Some of the safest ones are listed below.

  • Times New Roman

  • Arial

  • Courier New, Courier

  • Garamond

  • Georgia

  • Lucida Sans, Lucida Grande, Lucida

  • Palatino Linotype

  • Verdana

  • Trebuchet

Embedding Web Fonts

We have also got the facility to upload a font in the server and use it on our website with the help of the CSS @font-face at-rule. This feature has provided several advantages in online typography.

To embed our web fonts on the website at first, we utilize the @font-face at-rule to get the name of our font, with the help of 'font-family' property, and the source of the desired font, with the help of the 'src' property. From that point, we can utilize this textual style by including its name inside any ‘font-family’ property value.

@font-face {

  font-family: "Lobster";

  src: local("Lobster"), url("lobster.woff") format("woff");

}

body {

  font-family: "Lobster", "Comic Sans", cursive;

}

Having the option to upload any typeface in our server and use them on our website doesn't mean we have the authority to do it legally. Typefaces are works of art, and uploading them on our server may enable others to take them effectively. The ability to utilize a typeface relies upon the authorizing we've been justified.