Which of the following property converts text to initial capitals, all uppercase, or all lowercase?

text-transform
text
text-decoration
text-uppercase

The correct answer is A. text-transform.

The text-transform property is used to specify the capitalization of text. It can be used to convert text to initial capitals, all uppercase, or all lowercase.

The following are the possible values for the text-transform property:

  • capitalize: This value will convert the first letter of each word to uppercase.
  • uppercase: This value will convert all letters to uppercase.
  • lowercase: This value will convert all letters to lowercase.
  • none: This value will leave the text as it is.

For example, the following code will convert the text “Hello World” to “HELLO WORLD”:

p {
text-transform: uppercase;
}

The following code will convert the text “Hello World” to “hElLo WoRlD”:

p {
text-transform: capitalize;
}

The following code will convert the text “Hello World” to “hello world”:

p {
text-transform: lowercase;
}

The following code will leave the text “Hello World” as it is:

p {
text-transform: none;
}

Exit mobile version