The visited link color is the shade your browser displays for hyperlinks you have already clicked
When you click a link and then return to the page, your browser remembers that you visited the destination. To show you this history at a glance, it changes the link's color from the default (usually blue) to a different shade — typically purple or dark red. This visual cue helps you navigate without revisiting the same pages repeatedly.
The visited link color is set by your browser's default styling, but web designers can override it using CSS. The color appears only in your own browser based on your personal browsing history — it does not sync across devices, and other people cannot see which links you have visited on a shared computer.
Key Takeaways
- Visited links change color automatically when you return to a page where you have already clicked them, helping you track where you have been.
- The default visited link color is purple in most browsers, but web designers can change it to any color using the CSS :visited pseudo-class.
- Your visited link history is stored locally on your device and does not transfer between browsers, devices, or user accounts.
- Browsers limit what information CSS can read from visited links for privacy reasons — designers cannot detect which links you have visited through JavaScript.
How the visited pseudo-class works in CSS
To change the visited link color on a website, designers use the :visited pseudo-class in their CSS code. A pseudo-class is a keyword that targets elements in a specific state. The syntax looks like this:
a:visited { color: purple; }
This rule tells the browser: "For any link (a tag) that the user has visited, display it in purple." Designers can apply any color, and they can also change other properties like font weight, text decoration, or background color. For example, a designer might make visited links appear slightly faded or add an underline to distinguish them further.
The :visited pseudo-class works alongside other link states. An unvisited link uses :link, a link the user is hovering over uses :hover, and a link the user is actively clicking uses :active. Together, these states create a complete visual feedback system that tells you what you can do with each link.
Where your visited link history is stored
Your browser keeps a local record of every site you have visited, stored in a file on your device. When you load a page, the browser checks each link against this history and applies the visited color if there is a match. This history is private to your device — it does not upload to the cloud, sync to other devices, or appear anywhere else.
Each browser maintains its own separate history. If you visit a link in Chrome, it will not show as visited in Firefox on the same computer. Similarly, visited links do not carry over between user accounts on the same device. If you share a computer with someone else, they will not see your visited links, and you will not see theirs.
You can clear your visited link history by clearing your browser history. Most browsers let you delete history from a specific time range — the last hour, day, week, or all time. Once cleared, all links will revert to their unvisited color until you click them again.
Why browsers restrict what designers can do with visited links
Browsers intentionally limit the CSS properties that work with the :visited pseudo-class. Designers cannot change the link's size, position, or display type, and they cannot use certain color-related properties. This restriction exists for privacy reasons: if designers could read detailed information about visited links through CSS or JavaScript, malicious websites could detect which other sites you have visited.
For example, a website could theoretically load links to thousands of popular sites and check which ones appear visited, building a profile of your browsing habits without your knowledge. By restricting what CSS can do, browsers prevent this kind of tracking. You can only change the color and a few other visual properties that do not reveal information to the website.
JavaScript cannot access visited link information at all. If you write code to check whether a link has the :visited style applied, the browser will return a false result, even if you have actually visited that link. This is another privacy safeguard that keeps your browsing history private.
Common visited link colors and design choices
Purple is the most recognizable visited link color because it has been the browser default for decades. Most users expect visited links to be purple, so many designers keep this convention even when they customize other colors on their site. However, some websites choose different colors to match their design system — dark red, dark green, or gray are common alternatives.
The key is contrast: the visited color needs to be visually distinct from both the unvisited link color and the regular text color, so users can tell the difference at a glance. A visited link that is too similar to unvisited links defeats the purpose. Designers often test their color choices with accessibility tools to ensure the contrast is strong enough for people with color blindness or low vision.
Some modern websites de-emphasize the visited link color or remove it entirely, relying instead on other visual cues like icons or text labels. This choice reflects a shift in how people browse — many users clear their history frequently, or expect websites to remember their preferences through accounts rather than browser history.
How to check or change visited link colors in your browser
You cannot directly change the visited link color in most browsers through the settings menu. The color is determined by the website's CSS, and your browser applies it on top of its own defaults. However, you can use browser extensions or custom CSS to override a website's visited link styling if you prefer a different color.
To see what visited link color a website uses, click a link on the page and then go back. The link will change color. If you want to see all the CSS rules for a page, right-click on any element and select "Inspect" or "Inspect Element" — this opens the browser's developer tools, where you can search for :visited rules in the stylesheet.
If you want to prevent your browser from tracking visited links at all, you can use private browsing mode (called Incognito in Chrome, Private in Firefox). In private mode, your browser does not save history, so all links will always appear unvisited, even if you have clicked them before in that session.
Frequently Asked Questions
Can a website see which links I have visited?
No. Browsers block websites from reading your visited link history through JavaScript or other methods. A website can only display visited links in a different color using CSS — it cannot detect or report back which links you have actually visited. Your browsing history remains private to your device.
Why do some links not change color after I click them?
The website's designer may have disabled the visited link styling, or the link may point to a different URL each time (for example, links with tracking parameters that change). Some websites also use JavaScript to handle navigation instead of standard links, which can prevent the visited state from being recognized.
Do visited links sync across my devices?
No. Visited link history is stored only on the device where you browse. If you use Chrome on your phone and Chrome on your laptop, each device maintains its own separate history. Some browsers offer history sync through an account, but this is different from visited link styling — it is a separate feature you must turn on.
Can I make visited links look the same as unvisited links?
Yes, by writing CSS that sets a:visited to the same color as a:link. However, this removes a useful navigation aid for users. Most accessibility guidelines recommend keeping visited links visually distinct so people can track where they have been on a page.
What happens to visited links if I clear my browser history?
All links revert to their unvisited color immediately. Your browser deletes the record of which sites you have visited, so it no longer recognizes any links as visited until you click them again. The visited styling will return once you revisit those pages.