HTML and CSS Reference
In-Depth Information
___________
6
The ::marker selector is explained in greater detail in another specification,
CSS Lists and Coun-
ters Module Level
3, accessible here:
http://www.w3.org/TR/css3-lists/#marker-pseudoelement
7
See
http://www.iana.org/assignments/language-subtag-registry
for a list of language codes, the
“subtags” shown are what you would use.
all elements that
do not
match a certain selector. Combined with other selectors, it can
be used to create quite complex matching rules for a style. For example, for the purposes
of visually identifying the links on my site that linked to external resources that I did
not want to endorse, I might choose to select and style all links that did not contain the
“anselmbradford.com” URL in their
href
property and contained the
nofollow
or
noreferrer
attribute values in their
rel
attribute:
a[rel^="no"]:not([href*="anselmbradford.com"])
{
col-
or:red; }
The first part is an attribute selector that works on the
rel
attribute, while the second
part contains another attribute selector for working on the
href
attribute, the results of
which are negated by the
:not()
selector. Notice that we just search for a value for
rel
that begins with "no" to pick up the two possible values. Applied to the following
code snippet, the preceding selector would skip styling the first anchor, style the second
and third anchor, and skip the fourth:
<a href="http://anselmbradford.com" rel="noreferrer"> An-
selm's website </a>
<a href="http://example.com/contact.html"
rel="noreferrer"> Example.com contact </a>
<a
href="http://example.com/links.html"
rel="nofollow">
Search WWH ::
Custom Search