HTML and CSS Reference
In-Depth Information
p.note::before {
content: “NOTE: “;
font-weight: bold;
}
Chapter 10 covers generated content and the content property in more
depth.
The selection pseudo-element represents a virtual inline element that
wraps any text selected by a visitor. With any selection, you can set a
limited number of properties including the color and background color
of the text.
::selection { color: black; background-color: yellow; }
note
The selection pseudo-element has been removed from the current
CSS3 Selectors Module Recommendation but is implemented in some
browsers as
::selection
and in Firefox and other Gecko browsers as
::-moz-selection
.
The selectors described to this point select elements based on an
element type or the properties of an element. Combinators are used
to combine these simple selectors in ways that describe document
structure.
Represented by whitespace, the descendant selector describes an
element (F) that is contained within another element (E). The number