I’ll take the question to clarify a few things.
The link has some different states depending on the interaction of the úsuário.
a {}
a:link {}
a:visited {}
a:focus {}
a:hover {}
a:active {}
Source: https://developer.mozilla.org/en-US/docs/Learn/CSS/Styling_text/Styling_links
W3.org recommends the following::
:link { color: #0000EE; } /* cor azul */
:visited { color: #551A8B; } /* cor roxa */
:link:active, :visited:active { color: #FF0000; } /* cor vermelha */
:link, :visited { text-decoration: underline; cursor: pointer; }
a:link[rel~=help], a:visited[rel~=help],
area:link[rel~=help], area:visited[rel~=help] { cursor: help; }
Source: https://www.w3.org/TR/html5/rendering.html#phrasing-content-0
In short, it recommends the colors as above and the use of Underline
and Cursor:Pointer
But by default the browser itself create some styles that may vary from one to the other. This image is just to illustrate what might happen with some different browser HTML elements.
In this example you see how it looks in different versions of browser.
Here is a complete list of Default Values for all HTML Elements
https://www.w3schools.com/cssref/css_default_values.asp
On this underline you see below the Link you can treat it with 3 classes:
text-decoration-color: ;
text-decoration-line: ;
text-decoration-style: ;
- Color is the color of the line (hexadecimal, rgb, etc)
- Line is if you have line and position (undeline, overline, etc)
- Style is the style of the line (Wavy, dottet, etc)
Here are some simple examples of how to use the classes:
a {
text-decoration: underline;
text-decoration-style: wavy;
text-decoration-color: orange;
display: block;
margin: 16px;
}
a.under {
color: #333;
text-decoration: underline;
text-decoration-style: double;
text-decoration-color: currentcolor;
}
a.over {
text-decoration: overline;
text-decoration-style: dotted;
text-decoration-color: green;
}
a.line {
color: rgb(15, 139, 36);
text-decoration: line-through;
text-decoration-style: dashed;
text-decoration-color: red;
}
a:active {
color: cyan;
font-size: 110%;
}
<a href="#">underline wavy</a>
<a href="#" class="under">underline</a>
<a href="#" class="over">overline</a>
<a href="#" class="line">line-through</a>
<a href="#">active none</a>
Source: https://www.w3schools.com/cssref/pr_text_text-decoration.asp