Which CSS property controls the text size?

Prepare for the WebXam Web Development Test with our engaging quizzes featuring flashcards and multiple choice questions. Each question is complemented with hints and explanations to enhance your learning. Get exam-ready today!

The correct answer is the property that specifically defines the size of text in CSS. The font-size property is essential for controlling how large or small the text appears on a webpage. By adjusting this property, a web developer can set various sizes using absolute values, such as pixels (px), ems, or percentages, allowing for responsive design.

For instance, using font-size: 16px; will make the text size 16 pixels, while a percentage value such as font-size: 125%; will scale the text size relative to its parent element. This property is fundamental in ensuring that text is not only legible but also aesthetically pleasing, fitting well within the overall design of a webpage.

The other choices relate to different aspects of typography but do not specifically control text size. The font-style property is used to define the style of the text, such as normal, italic, or oblique. Text-size and text-style are not valid CSS properties, which means they would not function in stylesheets. Therefore, the emphasis on font-size being the correct property highlights its primary role in defining the text size on a webpage.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy