24.08.2016 Views

HTML and CSS design and build websites

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Underline & Article Strike<br />

text-decoration<br />

<strong>CSS</strong><br />

chapter-12/text-decoration.html<br />

.credits {<br />

text-decoration: underline;}<br />

a {<br />

text-decoration: none;}<br />

Result<br />

The text-decoration property<br />

allows you to specify the<br />

following values:<br />

none<br />

This removes any decoration<br />

already applied to the text.<br />

underline<br />

This adds a line underneath the<br />

text.<br />

overline<br />

This adds a line over the top of<br />

the text.<br />

line-through<br />

This adds a line through words.<br />

blink<br />

This animates the text to make it<br />

flash on <strong>and</strong> off (however this is<br />

generally frowned upon, as it is<br />

considered rather annoying).<br />

In this example, the credits have<br />

been underlined. Also, the name<br />

of the breed (which is a link) is<br />

not underlined, which it would<br />

be by default because it is a link.<br />

This property is commonly<br />

used by <strong>design</strong>ers to remove<br />

the underlines that browsers<br />

place under links. Pages 290-291<br />

show how to add or remove an<br />

underline when a user hovers<br />

over a link.<br />

TEXT<br />

282

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!