Example:
A:link { color:red }
A:visited { color:blue }
A:active { color:green }
See this example.
Note that the anchor pseudoclasses only affect the A tag, so it may be
ommitted:
A:link { color:red }
:link { color:red }
These are equivalent.
If you wish to use it with another tag such as an IMG tag, you can do:
A:link IMG { color:blue }
You can also include pseudoclasses with normal classes. Example:
A.rollin:link { color:green }
<A class="rollin" HREF="http://www.netscape.com/">A link in a class by itself</A>
<HTML>
<HEAD>
<STYLE type="text/css">
<!--
P:first-line { color:green }
-->
</STYLE>
</HEAD>
<BODY>
<P >
This is a paragraph spread<BR>
over two lines.
</P>
</BODY>
</HTML>
See this example.
Note: Not yet supported by either browser?
<HTML>
<HEAD>
<STYLE type="text/css">
<!--
P:first-letter { color:green }
-->
</STYLE>
</HEAD>
<BODY>
<P >
This is a paragraph spread<BR>
over two lines.
</P>
</BODY>
</HTML>
See this example.
Note: Not yet supported by either browser?
Previous SectionNesting |
Table of Contents |
Next Section
![]() Including Files |