Which of the following property is used to set the text direction?

color
direction
letter-spacing
word-spacing

The correct answer is: B. direction

The direction property is used to set the text direction. It can be set to ‘ltr’ (left-to-right) or ‘rtl’ (right-to-left).

The color property is used to set the color of text.

The letter-spacing property is used to add space between letters.

The word-spacing property is used to add space between words.

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

css
p {
direction: rtl;
}

This will cause the text in the paragraph to flow from right to left.

Exit mobile version