a[href^="http:"]
Selects an <a>
element whose href
attribute value begins with http:
.
For example:
p[title^="para"] {background: green;}
Will match the following:
<p title="paragraph"> This paragraph should have a green background. </p>
More Related Contents:
- Can I combine :nth-child() or :nth-of-type() with an arbitrary selector?
- How do I select the “last child” with a specific class name in CSS? [duplicate]
- How can I write a ‘:hover’ condition for ‘a:before’ and ‘a:after’?
- How to combine class and ID in CSS selector?
- :first-child not working as expected
- What is the difference between :first-child and :first-of-type?
- Does CSS have a :blur selector (pseudo-class)?
- Specify multiple attribute selectors in CSS
- Should I use single or double colon notation for pseudo-elements?
- How to make Internet Explorer 8 to support nth child() CSS element?
- In CSS what is the difference between “.” and “#” when declaring a set of styles? [duplicate]
- Universal selector * and pseudo elements
- How to only show certain parts with CSS for Print?
- Webkit bug with `:hover` and multiple adjacent-sibling selectors
- Why use an attribute selector to match classes?
- Is it possible to use a CSS wildcard in the middle of an attribute selector?
- CSS selector to get deepest element of specific class in the HTML tree
- CSS Specificity and Inheritance
- Zebra striping a table with hidden rows using CSS3?
- Vertically centering content of :before/:after pseudo-elements
- Difference between the selectors div + p (plus) and div ~ p (tilde)
- Are CSS selectors case-sensitive?
- CSS combinator precedence?
- What is caret symbol ^ used for in css when selecting elements?
- What is the difference between p:nth-child(2) and p:nth-of-type(2)?
- CSS specificity or inheritance?
- How to skip first child?
- How to select all elements whose ID starts and ends with specific strings?
- selector for nth nested elements
- Latest on CSS parent selector [duplicate]