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 8493341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:58:41+00:00 2026-06-10T22:58:41+00:00

The W3C Recommendations defines the ability to select any anchor which has a defined

  • 0

The W3C Recommendations defines the ability to select any anchor which has a defined class by using A[CLASS]{/*Code*/}, but is there an antecedent?

Can I select all anchors that do NOT have a class?

My instinct is to use A[~CLASS]{/*Code*/}, but that isn’t documented, and A[CLASS=]{/*Code*/} selects all anchors which have a class name which is an empty string (for instance, <A CLASS="" HREF="http://example.com/">This anchor has a class, but it's empty.</A>).

Example usage


In this code, I only want classless links to be green.

<HTML>
<HEAD>
<LINK REL="stylesheet" TYPE="text/css" HREF="http://example.com/externalUneditableStyles.CSS" />
<STYLE>
A.deadLink{
color:#FF0000 !important;
}
A{
color:#00FF00;
}

</STYLE>
</HEAD>

<BODY>
<A HREF="http://fakesite.not/" CLASS="deadLink">This link is red, as specified by the CSS above.</A>
<A HREF="http://example.com/">This link is green, as specified by the CSS above.</A>
<A HREF="#/childpage/" CLASS="childLink">This is a link to a child page, and is styled by external uneditable CSS. That CSS doesn't specify a color, so it is green, even though that might not be the intended effect.</A>
</BODY>
</HTML>
  • 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-06-10T22:58:43+00:00Added an answer on June 10, 2026 at 10:58 pm

    Use something like this:

    a:not([class]) {
        /*some styling here*/
    }
    

    Little demo: little link.

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

Sidebar

Related Questions

I have a org.w3c.dom.Node object. I would like to see if it has any
I'm using the W3C CSS Validator with the Profile CSS3 but the validator says
Code is W3C valid, and everything should be fine. But when user clicks the
I know W3C Validator can do this but i need any free offline editor.
I'm using the w3c bibtex transform to generate a bibtex file, but unfortunately it's
i look at W3C but not find any rule for browser, all the browser
The W3C Validation images are very large. Are there by any chance alternatives that
I have a file which imports org.w3c.dom.Document. Compiling and running is fine, but I
Are there any ways providing an alternate GIF/PNG image, in case the user has
I am creating a W3C Document object using a String value. Once I created

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.