Which of the following CSS property is used to set the text formatting?

font
font-style
text-decoration
all of the mentioned

The correct answer is D. all of the mentioned.

The font property is used to set the font family, size, weight, style, and color of text. The font-style property is used to set the font style, such as normal, italic, or bold. The text-decoration property is used to add decorations to text, such as underline, strikethrough, or overline.

Here is an example of how to use the font property:

css
p {
font-family: Arial, sans-serif;
font-size: 16px;
font-weight: bold;
}

This code will set the font family of all paragraphs to Arial, the font size to 16px, and the font weight to bold.

Here is an example of how to use the font-style property:

css
p {
font-style: italic;
}

This code will set the font style of all paragraphs to italic.

Here is an example of how to use the text-decoration property:

css
p {
text-decoration: underline;
}

This code will underline all paragraphs.