Academic Tutorials



English | French | Portugese | German | Italian
Google

Home Source Codes E-Books Downloads Contact Us About Us

CSS Tutorial
CSS Introduction
CSS Basic Syntax
CSS How to Insert
CSS Selector
CSS Internal
CSS External
CSS Inline
CSS Classes
CSS Background
CSS Text
CSS Font
CSS Border
CSS Margin
CSS Padding
CSS List
CSS Dimension
CSS Classification
CSS Positioning
CSS Pseudo-class
CSS Pseudo-element
CSS Media Types
CSS Mouse Cursor
CSS Properties
CSS Layers
CSS Float
CSS Summary

HTML Tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
TCP/IP Tutorial
XML Tutorials
XML Tutorial
XSL Tutorial
XSLT Tutorial
DTD Tutorial
Schema Tutorial
XForms Tutorial
XSL-FO Tutorial
XML DOM Tutorial
XLink Tutorial
XQuery Tutorial
XPath Tutorial
XPointer Tutorial
RDF Tutorial
SOAP Tutorial
WSDL Tutorial
RSS Tutorial
WAP Tutorial
Web Services Tutorial
Browser Scripting
JavaScript Tutorial
VBScript Tutorial
AJAX Tutorial
DHTML Tutorial
HTML DOM Tutorial
WMLScript Tutorial
E4X Tutorial
Server Scripting
ASP Tutorial
PHP Tutorial
PERL Tutorial
SQL Tutorial
ADO Tutorial
.NET (dotnet)
Microsoft.Net
XML Web Services
ASP.Net
.Net Mobile
C# : C Sharp
ADO.NET
VB.NET
Multimedia
SVG Tutorial
Flash Tutorial
Media Tutorial
SMIL Tutorial
Web Building
Web Browsers
Web Hosting
W3C Tutorial
Web Building
Web Quality
Web Semantic
Web Careers
Java Tutorials
Java Tutorial
JSP Tutorial
Servlets Tutorial
Struts Tutorial
EJB Tutorial
JMS Tutorial
JMX Tutorial
Programming Langauges
C Tutorial
C++ Tutorial
Visual Basic Tutorial
Data Structures Using C
Soft Skills
Communication Skills
Time Management
Project Management
Team Work
Leadership Skills
Corporate Communication
Negotiation Skills


CSS Pseudo-class
Previous Next

  • To add effects to your anchor tags,CSS is used , otherwise known as hyperlinks.


  • With the addition of CSS, javascript links can be forgotten.In HTML, the only way to add this effect would be to use javascript,



CSS Anchor/Link States

You may not know it, but a link has four different states that it can be in.To customize each state, CSS is used. Please refer to the following keywords that each correspond to one specific state:

  • link - this is a link that has not been used, nor is a mouse pointer hovering over it
  • visited - this is a link that has been used before, but has no mouse on it
  • hover - this is a link currently has a mouse pointer hovering over it/on it
  • active - this is a link that is in the process of being clicked

You can make a different look for each one of these states using CSS, but at the end of this lesson we will suggest a good practice for CSS Links.




CSS Pseudo-Classes

what you've seen is a little different than the format for CSS Links . You have to use the following CSS code formatting to modify these 4 states

CSS Code
a:(STATE'S NAME) { attribute: value; }

How the HTML element should appear, depending on which state it is in ,the state's name which is called the "pseudo class" is uesd. Below is an example of changing the "link", "visited", and "hover" state. Note to make a functioning CSS link,the order that they are defined, it is the proper ordering.

CSS Code
a:link { color: red; }
a:visited { color: red; }
a:hover { color: blue; }
CSS Code
<a href="">This is a special CSS Link</a>!

  • The states must be defined in the correct order. Here is the order, starting with the one you must define first:


  • 1.link
    2. visited
    3.hover
    4. active




Removing the Default Underline

Throughout academic-tutorial.com you probably have noticed the different styles that we have for certain links. Unless you are hovering, our menu's do not have an underline while the links in our main content do have underlines. Use text-decoration: none to remove the underline from certain states of a hyperlink,.:

CSS Code
a:link { color: red; text-decoration: none; }
a:visited { color: red; text-decoration: none; }
a:hover { color: blue; }



One Sample Example

To manipulate the states of a hyperlink,below sample example that use many forms of CSS

CSS Code
a:link {
color: white;
background-color: black;
text-decoration: none;
border: 2px solid white;
}

a:visited {
color: white;
background-color: black;
text-decoration: none;
border: 2px solid white;
}

a:hover {
color: black;
background-color: white;
text-decoration: none;
border: 2px solid black;
}




The follwing table describe the Pseudo-class and its Purpose:

Pseudo-class Purpose
:active Adds special style to an activated element
:focus Adds special style to an element while the element has focus
:hover Adds special style to an element when you mouse over
:link Adds special style to an unvisited link
:visited Adds special style to a visited link
:first-child Adds special style to an element that is the first child of some other element
:lang Allows the author to specify a language to use in a specified element


Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • connotea
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Netvouz
  • RawSugar
  • Reddit
  • scuttle
  • Shadows
  • Simpy
  • Smarking
  • Spurl
  • TailRank
  • Wists
  • YahooMyWeb

Previous Next

Keywords: css link hover, css link color, css link styles, cascading style sheets


HTML Quizes
HTML Quiz
XHTML Quiz
CSS Quiz
TCP/IP Quiz
XML Quizes
XML Quiz
XSL Quiz
XSLT Quiz
DTD Quiz
Schema Quiz
XForms Quiz
XSL-FO Quiz
XML DOM Quiz
XLink Quiz
XQuery Quiz
XPath Quiz
XPointer Quiz
RDF Quiz
SOAP Quiz
WSDL Quiz
RSS Quiz
WAP Quiz
Web Services Quiz
Browser Scripting Quizes
JavaScript Quiz
VBScript Quiz
AJAX Quiz
DHTML Quiz
HTML DOM Quiz
WMLScript Quiz
E4X Quiz
Server Scripting Quizes
ASP Quiz
PHP Quiz
PERL Quiz
SQL Quiz
ADO Quiz
.NET (dotnet) Quizes
Microsoft.Net Quiz
XML Web Services Quiz
ASP.Net Quiz
.Net Mobile Quiz
C# : C Sharp Quiz
ADO.NET Quiz
VB.NET Quiz
Multimedia Quizes
SVG Quiz
Flash Quiz
Media Quiz
SMIL Quiz
Web Building  Quizes
Web Browsers Quiz
Web Hosting Quiz
W3C Quiz
Web Building Quiz
Web Quality Quiz
Web Semantic Quiz
Web Careers Quiz
Java Quizes
Java Quiz
JSP Quiz
Servlets Quiz
Struts Quiz
EJB Quiz
JMS Quiz
JMX Quiz
Programming Langauges Quizes
C Quiz
C++ Quiz
Visual Basic Quiz
Data Structures Using C Quiz
Soft Skills Quizes
Communication Skills Quiz
Time Management Quiz
Project Management Quiz
Team Work Quiz
Leadership Skills Quiz
Corporate Communication Quiz
Negotiation Skills Quiz

Privacy Policy
Copyright © 2003-2008 Vyom Technosoft Pvt. Ltd., All Rights Reserved.