HTML and CSS Certification Practice Test

Image Description

Question: 1 / 400

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

font-size

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.

Get further explanation with Examzify DeepDiveBeta

text-align

line-height

font-weight

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy