5.4 Text Decoration

CSS text-decoration Property

The text-decoration property specifies the decoration added to text, and is a shorthand property for:
  • text-decoration-line (required)
  • text-decoration-color
  • text-decoration-style

CSS text-decoration-line Property

The text-decoration-line property sets the kind of text decoration to use (underline, overline, line-through).
Note: You can also combine more than one value, like underline and overline to display lines both under and over the text.

CSS text-decoration-color Property

The text-decoration-color property specifies the color of the text-decoration (underlines, overlines, linethroughs).

CSS text-decoration-style Property

The text-decoration-style property sets the style of the text decoration (solid, wavy, dotted, dashed, double).

CSS font-weight Property

The font-weight property sets how thick or thin characters in text should be displayed (normal, bold, bolder, lighter, multiples of 100).

CSS font-style Property

The font-style property specifies the font style for a text (normal, italic, oblique).

CSS font-size Property

The font-size property sets the size of a font.
notion image

CSS text-shadow Property

The text-shadow property adds shadow to text.
notion image
notion image

CSS text-indent Property

The text-indent property specifies the indentation of the first line in a text-block.

CSS letter-spacing Property

The letter-spacing property increases or decreases the space between characters in a text.
notion image

Previous Section

5.3 Display
Copyright © 2021 Code 4 Tomorrow. All rights reserved. The code in this course is licensed under the MIT License. If you would like to use content from any of our courses, you must obtain our explicit written permission and provide credit. Please contact classes@code4tomorrow.org for inquiries.