Which CSS rule would make every letter in an h1 element capitalize?

Prepare for the WDI General Assembly Assessment Test. Study using flashcards and multiple choice questions with hints and detailed explanations. Master your skills and boost your chances of success in the exam!

The rule that correctly transforms every letter in an h1 element to uppercase is the one that utilizes the property text-transform set to the value uppercase. When this rule is applied, all the text contained within the designated h1 elements will be rendered in capital letters, irrespective of how the text is originally input in the HTML. This is particularly useful for maintaining design consistency and ensuring that headings are visually distinct and prominent.

The other options provided do not achieve the desired effect of capitalizing every letter:

  • The option that mentions text-transform: capital does not exist; the valid property value should be capitalize, which only capitalizes the first letter of each word.

  • Using font-weight: bold simply adjusts the thickness of the font and does not affect the letter casing.

  • The option with text-transform: full is also not valid in CSS and does not perform any transformation related to capitalization.

Therefore, the first option is the correct rule for ensuring that every letter in an h1 element is displayed in uppercase.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy