CSS Text Decoration

How to create a text with over line or under lining in html?
I want to have a striked text / word ? How to create a blinking under lined text in html?

Explanation


Property :

Text Decoration

Usage:


text-decoration: underline;
text-decoration: overline;
text-decoration: line-through;
text-decoration: blink;

Definition:

Using this attribute we can decorate out text. The words can be made to blink, striked words, etc...
It takes the following values.
a)underline : You can under line the text or word by using this value.
b)overline : You can over line the text or word by using this value
c)line-through : You can strike through the text or word by using this value
d)blink : You can make the text to blink by using this value.

Example 1:


<font style="text-decoration: underline;"> Testing Text Decoration </font>
Result:

Testing Text Decoration

Example 2:


<div style="text-decoration: overline;"> Testing Text Decoration </div>
Result:

Testing Text Decoration

Example 3:


<h5 style="text-decoration:line-through;"> Testing Text Decoration </h5>
Result:

Testing Text Decoration

Example 4:

[IE and some older version of browsers might not support this value]
<font style="text-decoration: blink;"> Testing Text Decoration</font>
Result:

Testing Text Decoration

To get a text which is both under lined, over lined and also blinks, we have to use the values as said in the below example. This is how we can get blinking underlined text.

Example 5:


<font style="text-decoration: underline overline blink;"> Testing Text Decoration</font>
Result:

Testing Text Decoration


Ask Questions

Ask Question