Decorating and Transforming Text

text-decoration and text-transform decorate and transform text. text-decoration applies a decoration to a block of text none. Its allowed values are:

  • underline
  • overline
  • line-through
  • blink

text-transform applies a transformation to a block of text. Its allowed values are:

  • none
  • capitalize
  • uppercase
  • lowercase
 
<!DOCTYPE HTML> 
<html> 
    <head> 
        <title>Example</title> 
        <style> 
            p { 
                border: medium double black; 
                background-color: lightgrey; 
                text-decoration: line-through; 
                text-transform: uppercase; 
            } 
        </style> 
    </head> 
    <body> 
        <p> 
            HyperText Markup Language (HTML) is the main markup language for 
            displaying web pages and other information that can be displayed 
            in a web browser(From From Wikipedia, the free encyclopedia).
        </p> 
    </body> 
</html>
  
Click to view the demo
Home 
  HTML CSS Book 
    CSS  

Related: