CSS Tutorial

CSS Fonts

TGTeam GyaniPanditMay 24, 20221 min read

Well, if we ever want to play with the font of the text on our web pages, we can do that using several font-related properties. Remember that it is better to use a font, which is easy to read. So, we are going to have a look at several properties, like –

  • font-family →
    The font-family property is used to define a list of fonts for some elements. (the first font is the first preference, and the last font is generic)
  • font-size →
    As the name of the property says, the font-size property is used to define the font size for some element
  • font-style →
    The font-style property is used to set the style of the font
  • font-weight →
    The font-weight property is used to define the boldness of the text
  • font-variant. →
    This property is used to specify whether or not the text should be displayed in the small caps.

Let’s have a look at them one by one –

Turn reading into skillsCertificate courses in AI, Data Science and programming.
Explore Courses