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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:49:45+00:00 2026-06-18T03:49:45+00:00

One might use a CSS selector such as a[href^=http:], a[href^=mailto:] to match all external

  • 0

One might use a CSS selector such as a[href^="http:"], a[href^="mailto:"] to match all external and mail links within a document, but is there a way to use an “or” statement within the quotes section of the selector like so: a[href^="(http|mailto):"]?

  • 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-18T03:49:46+00:00Added an answer on June 18, 2026 at 3:49 am

    As far as I can tell, there’s no way to do what you’re asking. In the CSS selector spec, the pipe character is used for something different when used with attribute selectors. It’s used as a namespace separator.

    Per the selector spec on the W3C:

    The attribute name in an attribute selector is given as a CSS
    qualified name: a namespace prefix that has been previously declared
    may be prepended to the attribute name separated by the namespace
    separator “vertical bar” (|). In keeping with the Namespaces in the
    XML recommendation, default namespaces do not apply to attributes,
    therefore attribute selectors without a namespace component apply only
    to attributes that have no namespace (equivalent to “|attr”; these
    attributes are said to be in the “per-element-type namespace
    partition”). An asterisk may be used for the namespace prefix
    indicating that the selector is to match all attribute names without
    regard to the attribute’s namespace.

    CSS examples:
    
    @namespace foo "http://www.example.com";
    [foo|att=val] { color: blue }
    [*|att] { color: yellow }
    [|att] { color: green }
    [att] { color: green }
    

    The first rule will match only elements with the attribute att in the
    “http://www.example.com” namespace with the value “val”.

    The second rule will match only elements with the attribute att
    regardless of the namespace of the attribute (including no namespace).

    The last two rules are equivalent and will match only elements with
    the attribute att where the attribute is not in a namespace.

    Source: http://www.w3.org/TR/selectors/#attrnmsp

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

Sidebar

Related Questions

In C++ one might use namespace to keep independent groups working in the same
I'm searching for strategies one might use to programmatically find files which may be
I use the following css to display many images by one request div.image1{ backgroud:url(image.png)
One significant drawback of CSS is that one can't use variables. For example, I'd
This one might be a little confusing. I'm using AMCharts with rails. Amcharts comes
I find it not so easy as one might think to start with TDD
Sometimes in an application, one might compare the Message text of an exception. For
In the following inline conditionals, one might expect an integer and a double to
I'm not very expert on how processors work, but one might imagine that it
How might one craft a good explanation of why the following code is not

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.