Pseudo Classes:
Pseudo - Classes are dynamic and are used to style the content as a result user interaction. Pseudo- class starts with a colon(:).
For E.g: :hover, :active, :focus.
:hover -  This class changes the color of an element when the user points the mouse over it.
           (Try code in text editor and run it on the browser)
<html>
   <head>
  <style type="text/css">
     a:hover {color: #DF4718}
  </style>
     </head>
       <body>
       <a href="">Hover Example</a>
         </body>
            </html> 
:active -  This class changes the color of active links when user click on it.
  (Try code in text editor and run it on the browser)
       <html>
          <head>
            <style type="text/css">
              a:active {color: #FF00CC}
                 </style>
                </head>
                  <body>
                    <a href="">Active Example</a>
                     </body>
                        </html
:focus -  This class changes the color of the focused links.
 (Try code in text editor and run it on the browser)
       <html>
        <head>
        <style type="text/css">
          a:focus {color: #0000FF}
        </style>
       </head>
         <body>
         <a href="">Focus Example</a>
      </body>
          </html>  
                       
                    
0 Comment(s)