Which CSS property would you modify to change the size of text in an element?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Boost your HTML and CSS skills with our Certification Test. Practice with multiple-choice questions and comprehensively designed quizzes. Prepare thoroughly for your certification exam with detailed explanations and insights!

The property that you would modify to change the size of text within an element is font-size. This property directly controls the height of the text characters, allowing you to specify a specific size in units such as pixels (px), ems, rems, or percentages. By adjusting the font-size, you can enhance readability or create a specific visual hierarchy within your design.

In contrast, text-align deals with the positioning of the text itself within its container (for example, aligning it to the left, center, or right). Line-height affects the vertical spacing between lines of text, which plays a role in making text more readable but does not change the size of the text itself. Font-weight is used to control the thickness of the text characters, such as making them bold or regular, but again, this does not affect the actual height of the text. Thus, the font-size property is the correct choice for adjusting text size.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy