What property is applied to make each word in a text start with a capital letter?

Prepare for the Revature Test with our comprehensive study material. Use flashcards and multiple-choice questions, each with hints and explanations. Get exam-ready now!

The property that makes each word in a text start with a capital letter is text-transform: capitalize. This CSS property specifically modifies the case of text within an element, ensuring that the first letter of each word is transformed into uppercase.

When this property is applied, it takes control of the text rendering without altering the actual text content in the HTML. For example, if an element contains the text "hello world," applying text-transform: capitalize would result in "Hello World" being displayed on the webpage. This is particularly useful for stylistic consistency, especially in headings or any text where proper nouns or the beginning of each word is preferred to be highlighted with a capital letter.

In contrast, the other options serve different purposes. Text-decoration relates to the appearance of the text, such as underlining or striking through, but does not affect capitalization. Font-style deals with the style of the font, whether it is normal, italic, or oblique, without influencing the letter case. Letter-spacing adjusts the space between characters in the text but does not impact whether letters are capitalized or not.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy