Property: a:visited
Many a times we will want our links to show different colors.
We might want our visited links to be shown in red color and font size as 10px.
We might want our non-visited links to be shown in green color and font size as 15px.
This can be achieved by using internal style coding
For this, in the header portion add the style as
<style>
a{color: green; font-size: 15px}
a:visited{color: red; font-size: 10px;}
</style>
Definition:
We can set the link property for visited links using the tag "a:visited".
We can set any property (text, box, font, background properties).
Example:
The below links will give you the result:
The first link is some dummy value so it will be treated as a non-visited link.
The second link is for the same page("others.php") which is the visited link.
This is non-visited link
This is visited link
No underline Link:
Here we will show how to create links with out any underline
We use the attribute "text-decoration: none;" to handle it.
Example:
<a href="http://www.hscripts.com"
style="color: orange; font-size: 15px; text-decoration: none;">
Creating Link without a underline
</a>
Result:
Creating Link without a underline
|