Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

css

What is font-style property in CSS?

Hassaan Waqar

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

The font-style property in CSS is used to alter the font of a segment of text.

Syntax

The syntax of the font-style property is as follows:

font-style: normal|italic|oblique|initial|inherit;

Possible fonts

There can be five different types of fonts:

  • normal: Refers to a normal default browser font.

  • italic: Refers to an italic browser font.

  • oblique: Refers to an oblique browser font.

  • initial: Sets the font to an element’s default font.

  • inherit: Inherits a font from its parent element.

Example

The code snippet below shows each type of font-style in CSS:

    RELATED TAGS

    css

    CONTRIBUTOR

    Hassaan Waqar
    Copyright ©2022 Educative, Inc. All rights reserved

    Grokking Modern System Design Interview for Engineers & Managers

    Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

    Keep Exploring