Sometimes, you want to change the color of the links.
If you want a specific link to have a specific color, then you can use Inline CSS.
For all the links on your website to have a specific color, then you can use External CSS.
And for all the links on a particular page of your website to have a specific color, then you can use Internal CSS.
Let us see how you can change the color of the link using Internal CSS. In the same way, the color of the links can be changed in External and Inline CSS as well.
Styling HTML Links based on various stages of the link
There are 4 types of links based on the phase(stage) in which they are. These phases occur with a specific event which the user takes::
a:link → This is a normal link which the user has not visited. Indirectly, this link is an untouched and unvisited link.
a:visited → A link that the user has visited already in the stage of visited link. Normally, websites show this link in different colors as compared to the unvisited link.
a:hover → When the user moves the mouse over the link, then that particular instant when the user hovers over the link is hover stage. In some websites, the cursor changes to ‘handshape’ while moving the cursor.
a:active → The moment a link is clicked, that moment is called the active stage of the link so when the user clicks a particular link and the time frame window when the link is clicked, it is a phase of an active link.
alink– active-link is a normal link where the user has not visited. Indirectly, this link is not clicked and it is an unvisited link.
vlink– This is the Visited-link, here the user has clicked the link and now it is in the stage of visited link. Normally, websites show this link in different colors as compared to the unvisited link.
Button gives a call for action when we click on that. Usually, buttons are used to submit button, login button, etc. To add a link to the button we need to give a tag <a> tag within <button> tag.