Quantcast
Channel: Why do we need "a:link"? Why not just "a"? - Stack Overflow
Browsing latest articles
Browse All 6 View Live

Answer by Derick for Why do we need "a:link"? Why not just "a"?

It solely depends on your intention, so for your example, I would simply style all anchor elements one color and only change the style when the element is hovered.a {color: #000;}a:hover {color:...

View Article



Answer by RbG for Why do we need "a:link"? Why not just "a"?

a:link is specifically for links that have not been visited. a applies to all <a> elements.as you said I don't care whether the link is visited or notthen you may avoid the use of a:link ...use...

View Article

Answer by hobbs for Why do we need "a:link"? Why not just "a"?

Because not every a is a link.<a name="table_of_contents">Table of Contents</a>isn't a link, it's an anchor that can be linked to with <a href="#table_of_contents">.a will match it,...

View Article

Answer by Everett Green for Why do we need "a:link"? Why not just "a"?

It is used to differentiate between simple anchors and anchors with href attributes. See demo jsfiddle here.<style>a { color: red; }a:link { color: blue; }</style><a name="anchor">No...

View Article

Answer by VexNet for Why do we need "a:link"? Why not just "a"?

I suppose you can use <a>to create a button so that could produce alternate results...I always use a:link

View Article


Why do we need "a:link"? Why not just "a"?

It seems the following variants produce identical results:/* 1 */a, a:visited, a:active { color: black; }a:hover { color: red; }/* 2 */a, a:link, a:visited, a:active { color: black; }a:hover { color:...

View Article
Browsing latest articles
Browse All 6 View Live




Latest Images