What Is the Visited Link Color in Web Design?

If you've ever noticed that a link you've already clicked turns a different shade — typically purple — you've encountered the visited link color. It's a small but meaningful piece of web design with a surprisingly rich history, a defined role in usability, and a set of real constraints that developers and designers navigate every day.

The Default Visited Link Color and Where It Comes From

Browsers have applied a default color scheme to hyperlinks since the earliest days of the web:

Link StateDefault Browser Color
Unvisited linkBlue (#0000EE)
Visited linkPurple (#551A8B)
Active link (being clicked)Red

These defaults trace back to the original HTML specifications and early browser conventions established in the 1990s. The blue-to-purple shift became so universal that most users internalized it without ever being told what it meant. Seeing purple, your brain registers: I've been here before.

This isn't arbitrary aesthetics. The visited link color serves a navigational function — it reduces repeated backtracking, helps users orient themselves within a site, and signals which content has already been consumed.

How Visited Link Styling Works in CSS

Developers control visited link appearance using the CSS :visited pseudo-class:

a:visited { color: purple; } 

You can apply this to any anchor element and customize it just like any other CSS selector — changing hue, saturation, and lightness to match a site's visual identity while preserving the functional distinction between visited and unvisited states.

The Four Standard Link Pseudo-Classes

Web designers typically style all four link states together, following the LVHA order to avoid specificity conflicts:

  1. :link — unvisited
  2. :visited — already clicked
  3. :hover — cursor over the link
  4. :active — being clicked right now

Getting this order wrong can cause visited styles to be overridden or never appear at all.

Security Restrictions on :visited Styling 🔒

Here's where it gets technically interesting. Browsers deliberately limit what CSS properties you can apply to visited links. This restriction was introduced to prevent a class of privacy attack known as history sniffing.

The vulnerability worked like this: a malicious site could use JavaScript to detect the computed style of a link. If the link appeared purple, the script knew the user had visited that URL. Attackers could silently probe whether a user had visited a bank, a health site, or any other sensitive URL.

Modern browsers responded by restricting :visited styling to a small set of color-only properties:

  • color
  • background-color
  • border-color (top, bottom, left, right)
  • outline-color
  • column-rule-color
  • fill and stroke for SVG

Properties like font-size, display, padding, content, and background-imagecannot be changed via :visited in a way that JavaScript can detect. Browsers return the unvisited computed values to scripts regardless of what CSS you've written.

This means your visited link styling is visually functional but deliberately opaque to scripts — a deliberate trade-off between usability and privacy.

Variables That Affect How Visited Links Appear

The actual color a user sees depends on more than just your CSS. Several factors shape the real-world result:

Browser behavior: Each browser maintains its own visited link history. Chrome, Firefox, Safari, and Edge all honor :visited but implement the security restrictions slightly differently and may render colors with minor variation.

User-modified browser settings: Some users override default or custom link colors through accessibility settings, high-contrast modes, or browser extensions. A color you've carefully chosen may be partially or fully overridden.

Private/Incognito browsing: Most browsers do not record browsing history in private mode, which means :visited styles typically won't apply at all during those sessions. Links appear as unvisited even if the user has been to that URL before in a normal session.

History clearing: Users who regularly clear their browser history will see all links as unvisited. Your styling is only as useful as the history data the browser retains.

System dark mode: If your site uses a CSS prefers-color-scheme media query, your visited link color may need to be adjusted separately for dark mode to maintain sufficient contrast.

CSS specificity conflicts: If a parent element or another selector has higher specificity, it can override your :visited rule silently.

Accessibility Considerations

The Web Content Accessibility Guidelines (WCAG) don't mandate a specific visited link color, but they do require that links be visually distinguishable from surrounding body text — ideally through color contrast, underline, or both. The same principle applies to visited vs. unvisited states: if users can't reliably distinguish them, the navigational value disappears.

Relying on color alone to differentiate states is problematic for users with color vision deficiencies. Pairing the color change with a subtle style change — like removing an underline from visited links, or adjusting weight — can reinforce the distinction without depending entirely on hue perception.

The Spectrum of Design Approaches

How designers handle visited link color varies considerably depending on context:

  • Content-heavy sites (news, documentation, wikis) tend to preserve strong visited/unvisited contrast because users need to track what they've read.
  • Marketing and product sites often suppress visited styling entirely to keep visual presentation consistent and prevent a "used" appearance on calls-to-action.
  • Navigation menus frequently disable :visited color changes since menu items aren't content to be consumed once and moved past.
  • Accessibility-first designs treat visited state as a functional requirement and build it into the design system explicitly.

The right approach depends heavily on what users are doing on a given page, how long sessions typically last, and whether the site is primarily exploratory or transactional. Those factors vary from one project to the next — which is exactly why visited link color, despite being a small detail, ends up being a decision that needs to reflect the specific context of each site rather than a universal rule.