Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6706759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:33:30+00:00 2026-05-26T07:33:30+00:00

The W3.org CSS specification states the following (emphasis mine): The :link pseudo-class applies for

  • 0

The W3.org CSS specification states the following (emphasis mine):

  • The :link pseudo-class applies for links that have not yet been visited.
  • The :visited pseudo-class applies once the link has been visited by the user.

The two states are mutually exclusive.

This means that any style applied to the :link selector should only be applied to unvisited links. However, the only property for which this is true appears to be color. Applying font sizes, backgrounds and so on to the :link selector targets all links.

There is a note further down the page that states:

Note. It is possible for style sheet authors to abuse the :link and :visited pseudo-classes to determine which sites a user has visited without the user’s consent.

UAs may therefore treat all links as unvisited links, or implement other measures to preserve the user’s privacy while rendering visited and unvisited links differently.

However, as far as I’m aware this only applies to the styles returned by Javascript, not to the display of the styles themselves.

Here’s a JS fiddle showing the issue. Are the browsers deviating from the spec here, or is there something I’m missing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:33:30+00:00Added an answer on May 26, 2026 at 7:33 am

    The line,

    “UAs may therefore treat all links as unvisited links, or implement other measures to preserve the user’s privacy while rendering visited and unvisited links differently.”

    Isn’t applicable to styles returned by JavaScript only — it is exactly as it sounds. This means that browsers may just ignore certain properties on :visited entirely (which is what’s happening in this case). Since the font-size would increase the size of the containing element, allowing the property to be different for :visited links would undermine the other security measures implemented by the browser.

    A browser could choose to recalculate the dimensions without the :visited styles applied, if it wanted to. Naturally, this is more work and less performant than just disallowing certain properties. It’s clear that the decision has been made based on the fact that there is no real need to use different font sizes, backgrounds, etc to differentiate between visited and unvisited links and, generally, most developers will stick to just modifying the colour slightly.

    So no, they’re not deviating from the spec, they’re taking advantage of a permissible exception.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following less.css ( http://lesscss.org/ ): #content { overflow: hidden; width: 100%;
I know that :before/:after selectors are not available in IE 6,7 http://www.quirksmode.org/css/contents.html Is there
I have added <link rel=stylesheet type=text/css href=http://blogsoc.org/mail1/style.css/ /> in the index.html above tag. But
While validating my CSS on http://jigsaw.w3.org/css-validator/ I am getting following errors: 1.Property zoom doesn't
I'm following the standard of W3C here http://www.w3.org/TR/CSS2/ui.html and here http://www.quirksmode.org/css/cursor.html#note . However, the
I want to create an item (a link) that will have inner shadows on
https://developer.mozilla.org/en/CSS/inherit : For non-inherited properties, inherit specifies a behavior that typically makes relatively little
I'm trying to draw a cuboid with css (like this http://upload.wikimedia.org/wikipedia/commons/d/dc/Cuboid.png but ONLY 3
import org.joda.time.LocalDate; public class Test { public static void main(String[] args) { long time=System.currentTimeMillis();
The org-mode manual mentions a number of properties that can control the behavior of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.