CSS Special Effects

Some special effects in CSS are following:

Italics

CSS command for italics is font-style. The possible values are inherit, initial, italic, normal, oblique or unset.

Basic Syntax:
p{ font-style: italic; }


Example:
<!doctype html>  
<html>

    <head>
        <title>...</title>
    </head>
  
    <body>
       <p style="font-style: italic;">Learn CSS from PHPDocs.</p>
    </body>

</html>

Boldness

The property that controls the boldness of text is font-weight.

Basic Syntax:
p{ font-weight: bold; }


Example:
<!doctype html>  
<html>

    <head>
        <title>...</title>
    </head>
  
    <body>
       <p style="font-weight: bold;">Learn CSS from PHPDocs.</p>
    </body>

</html>

Capitalization

CSS provides two properties to specify the capitalization of text. Font-variant is used to set all characters in small versions of capital letters.

The possible values are:

  • uppercase: makes all the letters capital.
  • lowercase: makes all the letters small.
  • capitalize: capitalize the first letter in every word.
  • none: override any inherited transformation.
Basic Syntax:
p{ font-variant: small-caps; }


Example:
<!doctype html>  
<html>

    <head>
        <title>...</title>
    </head>
  
    <body>
       <p style="font-variant: small-caps;">Learn CSS from PHPDocs.</p>
    </body>

</html>