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

  • Home
  • SEARCH
  • 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 6322999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:26:13+00:00 2026-05-24T16:26:13+00:00

Excluding declarative event handlers: <a href=’#’ onclick=<handler> … /> Is there any material difference

  • 0

Excluding declarative event handlers:

<a href='#' onclick=<handler> ... />

Is there any material difference between an Attribute and a CSS Selector? If I provide my own attribute:

<a href='#' my-data-node-type='1'/>

Is “my-data-node-type” an attribute, a CSS Selector or both? I think what I’m really asking here is, are the terms “attribute” and “css selector” synonymous? Or is a “css selector” only an attribute recognized by CSS as eligible for styling?

  • 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-24T16:26:15+00:00Added an answer on May 24, 2026 at 4:26 pm

    CSS selectors are not attributes. They’re patterns used to decide which elements to apply styles to in the document.

    From the w3c: http://www.w3.org/TR/CSS2/selector.html

    “In CSS, pattern matching rules determine which style rules apply to elements in the document tree. These patterns, called selectors, may range from simple element names to rich contextual patterns. If all conditions in the pattern are true for a certain element, the selector matches the element.”

    In your case, the attribute name “my-data-node-type” may be used as part of a CSS selector to reference your link, but a CSS selector is not an attribute. Attributes aren’t part of CSS, they’re the name/value pairs of data you’ll find within element tags in HTML and other like markup languages, for example.

    <element my-attribute-name="my-attribute-value" />
    

    It’s not the standard, but the HTML Wikipedia page has a nice plain language description of attributes: http://en.wikipedia.org/wiki/Html

    For example, given the HTML:

    <div id="foo">
      <a data-node-type="foo" href="bar">Click me!</a>
    </div>
    

    “data-node-type” and “href” are the attributes of the <a> tag,

    # while:
    div#foo a[data-node-type=foo] 
    
    # or:
    div a[href]
    
    # or simply:
    a
    

    …are CSS selectors which would target that <a>, with the first two making use of its attributes.

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

Sidebar

Related Questions

In terms of PC development (excluding Xbox and Zune), What is the difference between
Is there any scenario where a client/user/hacker can set $_SESSION variables themselves (excluding malicious
Excluding any 3rd party extension not already bundled with PHP, Is there any method
Is there a way of getting all required assemblies (excluding the .net framework) for
rand(1,N) but excluding array(a,b,c,..) , is there already a built-in function that I don't
Before any of my article controller crud actions can run (excluding index), i want
[ Excluding any test code that just mocks a builtin ] Given that many
Excluding max length, what limitations does a string in java have? Are there things
Excluding the Micro Framework Emulator ;)
Excluding the check digit, what is the minimum length number the luhn algorithm will

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.