The text-decoration property is used to set or remove decorations from text. The text-decoration property is mostly used to remove underlines from links for design purposes, but also can be used to decorate text:
HTML file: | Displayed by browser: |
---|---|
<style>
a { text-decoration: none; } h1 { text-decoration: overline; } h2 { text-decoration: line-through; } h3 { text-decoration: underline; } </style> <body> <h1>H1 heading is overlined</h1> <h2>H2 heading is line-through</h2> <h3>This is heading 3</h3> <p> This was covered in the <a href="../html_beg/css12.html" target="_blank">HTML tutorial</a> but here it it again. Notice that the link's underline has been removed. </p> </body> |
H1 heading is overlinedH2 heading is line-throughThis is heading 3This was covered in the HTML tutorial but here it it again. Notice that the link's underline has been removed. |