So I read the docs and probably understand the purpose of ::before and ::after. If my understanding is correct, they should always work in combination with other elements. But the web page I'm look...
The pseudo-element selectors (or ::before and ::after) are used to generate content on the fly for browsers, and the results are called generated content. The generated content does not belong to the document's DOM, and thus is invisible to devices like screen readers.
This depends on what you're actually trying to do. If you simply wish to apply styles to a :before pseudo-element when the a element matches a pseudo-class, you need to write a:hover:before or a:visited:before instead. Notice the pseudo-element comes after the pseudo-class (and in fact, at the very end of the entire selector). Notice also that they are two different things; calling them both ...
Science Daily: A blood test could reveal Crohn’s disease years before symptoms
A new blood test may reveal Crohn’s disease years before symptoms begin. The test detects an unusual immune response to gut bacteria in people who later develop the condition. By studying healthy ...
MSN: A simple blood test can predict Crohn's disease years before symptoms appear
A simple blood test can predict Crohn's disease years before symptoms appear
EurekAlert!: A simple blood test can predict Crohn’s disease years before symptoms appear
A simple blood test can predict Crohn’s disease years before symptoms appear
The ::before notation (with two colons) was introduced in CSS3 in order to establish a discrimination between pseudo-classes and pseudo-elements. Browsers also accept the notation :before introduced in CSS 2.