Pseudo class

What is pseudo class?
If you want to know, then I will explain it according to my understanding. By the way if my english very bad, i’m sory because i learning it and i am use google transalte. Hahaha
Oke back to the topic. Pseudo class is a attribute from selector tag. Pseudo class marked with a colon ( : ). And some pseudo class not working or unsupported by browser. But there are four pseudo classes that supported all browsers.
Hmmmmm what is it?
That is:

  1. link. Link are used to link that has not been visited.
  2. Active. For link when get focus or clicked by mouse.
  3. Visited. Visited are used to link that has been visited.
  4. Hover. I’m very love with this.pseudo class because it will mark the link when cursor or mouse over it.


For exampe:

p:hover { 
       color: #CCC; 
       font-style: italic:
}

And this for full example:

<html>
<head>
<title>Pseudo Class</title>
     <style type="text/css">
     p:hover { 
         color: #CCC; 
         font-style: italic:
      }
     </style>
</head>
<body>
<p>Pseudo Class</p>
</body>
</html>

And open on your browser such as Chrome or Firefox. And the we will try four pseudo class that I have mentioned earlier. Example:

<html>
<head>
<title>Pseudo Class</title>
     <style type="text/css">
     a:link { color: blue}
     a:visited { color: purple }
     a:active { color: red }
     a:hover {
         color: yellow;
          font-weight: bold;
     }
     </style>
</head>
<body>
<a href="#>Read More</a>
</body>
</html>

Save and open from your browser.. 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s