About Lesson

CSS text and font properties

CSS text and font properties are used to control the appearance of text on a web page. They can be used to change the font, size, color, style, and alignment of text.

Here are some of the most common CSS text and font properties:

  • Font-family – This property specifies the font family of the text.
  • Font-size – This property specifies the size of the text.
  • Line-height – This property specifies the height of the text line.
  • Color – This property specifies the color of the text.
  • Font-weight – This property specifies the weight of the text.
  • Font-style – This property specifies the style of the text.
  • Text-align – This property specifies the alignment of the text.
  • Text-decoration – This property specifies the decoration of the text.
  • Text-transform – This property specifies the transformation of the text.

You can use these properties to create text that is both visually appealing and easy to read. For example, you could use the font-family property to set the font of the text to Times New Roman, the font-size property to set the size of the text to 16px, and the color property to set the color of the text to black.

You can also use CSS text and font properties to create more complex effects, such as drop shadows, outlines, and gradients.