formatting text in css

A paragraph styled with class selector

This text is styled with some of the text formatting properties. The heading uses the text-align, text-transform, and color properties. The paragraph is indented, aligned, space between characters is specified, first character of the paragraph is capitalized with a larger font size, and the first line is displayed in red color with all letters in small-caps. The underline is removed from the Visit our website link but appears when mouse moves over it.

by ABC

CSS Font, Text, and Pseudo Class Example Code

HTML CODE ........................................................................................................... <!DOCTYPE html> <html> <body> <h1>formatting text in css</h1> <p class="c1">A paragraph styled with class selector</p> <p class="c2">This text is styled with some of the text formatting properties. The heading uses the text-align, text-transform, and color properties. The paragraph is indented, aligned, space between characters is specified, first character of the paragraph is capitalized with a larger font size, and the first line is displayed in red color with all letters in small-caps. The underline is removed from the <a target="_blank" href="http://www.abc.com/index.html">Visit our website</a> link but appears when mouse moves over it.</p> <p class="c3">by ABC</p> </body> </html> CSS CODE ................................................................... h1{text-align: center; text-transform: uppercase; color: #A7C942;} p {text-indent: 50px; text-align:justify; letter-spacing:3px;} p.c1{font-weight: bold;} p.c2:first-letter{color:#ff0000; font-size: 40px;} p.c2:first-line{color:#ff0000; font-variant:small-caps;} .c3{font-style: italic; text-align: right;} a{text-decoration:none;} a:hover {text-decoration: underline;} Back