Best Source of Web Development Tutorials, Articles, Programming Codes, Free PHP Scripts, PHP Tutorials and Much More
Login
Username:
Password:

Working with Links in CSS

Working with Links

By: programmersbank

Using Links user can visit different pages and files. Both text and images are able to be used as a link source. In CSS you can define different styles for link. In CSS links has four differnet follow states :

  • a:link Defines a Normal unvisited link
  • a:visited specifies Visited Links
  • a:hover defines hovered links (A link is hovered when mouse moves over it).
  • a:active Specifies active it ( A link becomes active once you click on it)

Example

<style type="text/css"> 
              			  
a:link{
      color:blue;
      font-family:arial;
      font-size:12px
 } 

a:hover{
color:blue; font-family:arial;
font-size:12px } a:visited{
color:black; font-family:arial;
font-size:12px } </style> <a href="#">Check this Example</a>

Check this Example

Removing Undeline from a link:

Using CSS, you can remove underline from alink using (text-decoration:none), see this example

<style type="text/css"> 
              			  
a:link{
      color:red;
      font-family:arial;
      font-size:12px;
      text-decoration:none;

 } 

a:hover{
color:blue; font-family:arial;
font-size:12px; text-decoration:underline; } a:visited{
color:black; font-family:arial;
font-size:12px; text-decoration:none; } </style> <a href="#">Check this Example</a>

Tutorial Pages

Bookmark This Page