CSS - Font

About

This page is about font in CSS and html.

From a web perspective, a font is considered to be a media resource and can be included in any page from any origin.

Example: Google Font Api

<head>
   <link href='https://fonts.googleapis.com/css?family=Sofia' rel='stylesheet'>
   <style>
   body {
      font-family: 'Sofia';font-size: 22px;
   }
</style>
</head>

the font-size is set on the body to be able to set relative sizing

Stack / Family

A font stack is a list of fonts in order of preference. If the first font could not be loaded, the second one will take over.

['Helvetica', 'sans-serif']

Properties

Support

Font HTML element

The HTML font element has been deprecated in HTML 4.0.

Documentation / Reference





Discover More
CSS - font-size property

CSS CSS font-size in CSS is a property that defines the length (size) of a font. font-size by himself is an element of typography. responsive typography The font-size uses generally a relative...
HTML Font element

The HTML font element permits to specify the font (name, size, color, ...) of words
Media resources are images, JavaScript, CSS, or fonts

Web Resources - Media Resource Media resources are resources that are embedded into an page. They are from the following type: images, Script (JavaScript), CSS stylesheets, fonts iframes,...
The font weight in CSS

The font-weight determines the boldness of a font



Share this page:
Follow us:
Task Runner