Setting Underlining, Overlining, and Other Highlighting

In HTML, the U element can be used to underline text, and the S or Strike elements can be used to strike through text. In HTML 4, all of these elements are deprecated in favor of using styles to achieve the same results. In CSS, the text-decoration property is used to set underlining and strikethrough, as well as overlining and blinking highlighting. The accepted values for the text-decoration property include none, underline, overline, line-through, and blink. Here's an example of setting overlining for the H1 element (see Figure 8.12):

h1 {  text-decoration: overline; text-align: center; font-size: 2.5em; color:
rgb(200,140,40); }
Figure 8.12. Overlining is set here using the text-decoration ...

Get Cascading Style Sheets (CSS) by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.