HTML and CSS Reference
content: " (" attr(title) ")";
But, this means even links that are just linking to another location in the same page
same way! So, we would need to make sure we do not do this for these links.
For this, we use the attribute selector that allows us to select elements that have
properties that begin, end, or contain certain values. By using the selector
pseudo-elements of links that have the attribute href , whose value starts with the
Similarly, we also select all links which have the href attribute that begin with the #
character, as that means such links are inline links linking to another location within
the same page.
We then make sure we render no content for pseudo-elements within these links.
The rule then looks like the following code snippet:
Do note that these rules are not available for IE6 and if it is highly necessary to offer
Rendering all code and quotes within one page
It sometimes happens that your printed page would contain quotes or code, and as
a reader, it is annoying to keep referring back to a previous page when the code (or
the quote) could all have been within one page without any break. For this, we can
use the CSS page-break-inside property that allows you to tell the browser if