Introduction
The alink and vlink attributes in HTML were used to define the colors of active and visited links on a webpage. The alink attribute specified the color of a link when clicked, while vlink set the color of visited links. However, these attributes are now obsolete, and CSS is recommended for styling links.

In this article, we will learn about the alink and vlink attributes in HTML, how they define active and visited link colors, and their usage in web design.
What Are alink and vlink?
`alink` & `vlink` are attributes used in HTML to define the colors of links in different states within a webpage. These attributes are part of the `<body>` tag & are used to enhance the visual appearance of links.
1. alink (Active Link): The `alink` attribute specifies the color of a link when it is actively being clicked or selected by the user. For example, when you click on a link, it temporarily changes to the color defined by `alink`.
2. vlink (Visited Link): The `vlink` attribute defines the color of a link after it has been visited by the user. Once a user clicks on a link & navigates to the destination, the link color changes to the one specified by `vlink`.
These attributes were commonly used in older versions of HTML (HTML4 & earlier) to style links. However, in modern web development, CSS is preferred for styling purposes. Despite this, understanding `alink` & `vlink` is still useful, especially when working with legacy code or learning the evolution of HTML.
Let’s discuss a basic example of how `alink` & `vlink` are used in an HTML document:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>alink & vlink Example</title>
</head>
<body alink="red" vlink="purple">
<h1>Understanding alink & vlink</h1>
<p>Here are some links:</p>
<ul>
<li><a href="https://www.google.com">Google</a></li>
<li><a href="https://www.wikipedia.org">Wikipedia</a></li>
<li><a href="https://www.github.com">GitHub</a></li>
</ul>
</body>
</html>
Output

In this Code:
- The `alink="red"` attribute sets the active link color to red. When you click on any link, it will turn red.
- The `vlink="purple"` attribute sets the visited link color to purple. After visiting a link, it will change to purple.
- The `<a>` tags create hyperlinks to external websites.
This example shows how `alink` & `vlink` work together to style links dynamically based on user interaction.