Which CSS property creates rectangles with rounded corners around text?

Advance your skills with the uCertify CIW – Advanced HTML5 and CSS3 Specialist Test. Study with flashcards and multiple-choice questions, complete with hints and explanations to enhance your learning. Prepare effectively and ace your exam!

Multiple Choice

Which CSS property creates rectangles with rounded corners around text?

Explanation:
Border-radius controls the curvature of an element's corners. By assigning a radius value, you round the corners of the box that contains the text, so the text sits inside a rectangle with softened edges. For example, applying a value like 12px creates subtle rounding, while 50% can yield a pill or circle shape if the element’s height matches its width. Other properties don’t change the box shape: border draws a straight edge around the element, box-shadow only adds shading, and outline outlines the element without altering its corners. So the rounded corners come specifically from border-radius.

Border-radius controls the curvature of an element's corners. By assigning a radius value, you round the corners of the box that contains the text, so the text sits inside a rectangle with softened edges. For example, applying a value like 12px creates subtle rounding, while 50% can yield a pill or circle shape if the element’s height matches its width. Other properties don’t change the box shape: border draws a straight edge around the element, box-shadow only adds shading, and outline outlines the element without altering its corners. So the rounded corners come specifically from border-radius.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy