Home > DeveloperSection > Blogs > Text-alignment and Text-decoration Property using CSS3 and HTML

Text-alignment and Text-decoration Property using CSS3 and HTML


CSS-CSS3 CSS-CSS3 
Ratings:
0 Comment(s)
 1813  View(s)
Rate this:

Text-alignment and Text-decoration Property using CSS3 and HTML

In this blog I am trying to explain text-alignment and text-decoration Property using CSS3 and HTML.

Text-alignment:

Text-alignment property is set the text alignment as “center”, “right”, and “left”.

Right: If we set the Right value of text alignment property text will aligns to the right.

Center: If we set the center value of text alignment property text will aligns to the Center.

Left: If we set the Left value of text alignment property text will aligns to the Left.

Justify: If we set the justify value of text alignment property text will aligns to justify.

Text- decoration:

 Text- decoration property is help full for decoration the text.

None: If we set the none value of any property the text will be plain.

Overline: If we set the overline value of any property it will defines a line above the text.

Line-through: If we set the line-through value of any property it will defines a line through the text.

Blink: If we set the blink value of any property it will defines a blinking text.

Underline: If we set the Underline value of any property it will defines a line below the text.

<! DOCTYPE html>

<html>

<head>

<style>

h1 {text-align:center; text-decoration:overline; color:#CD853F;}

h2 {text-align:left; text-decoration:line-through; color:#CD853F;}

h3 {text-align:right; text-decoration:underline; color:#CD853F;}

h4 {text-decoration:blink; color:#CD853F;}

</style>

</head>

<body>

<h1>Mindstick</h1>

<h2>mindstick</h2>

<h3>Mindstick</h3>

<h4>Mindstick</h4>

</body>

</html>

Below is Output:


Don't want to miss updates? Please click the below button!

Follow MindStick