HTML and CSS Certification Practice Test 2025 – The All-in-One Guide to Master Your Certification!

Question: 1 / 400

What does the 'text-decoration' property do in CSS?

Changes the font size of text

Applies decorations to text, like underlines or strikethroughs

The 'text-decoration' property in CSS is used to apply various visual effects to text, particularly traditional decorations such as underlines, overlines, line-through (strikethrough), and none. For example, setting 'text-decoration: underline;' will add an underline beneath the specified text, while 'text-decoration: line-through;' will draw a line through the text. This property enhances the visual presentation and can also convey semantic meaning, such as indicating that certain text has been deleted or is not active anymore.

The other options focus on different aspects of text styling: adjusting font size pertains to the 'font-size' property, setting line height relates to 'line-height,' and changing text color is managed through the 'color' property. Each of these properties serves its unique function which does not overlap with the functionality of 'text-decoration.'

Get further explanation with Examzify DeepDiveBeta

Sets the line height of text

Adjusts the text color

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy