p::after { content: ' - Read more'; color: blue; }
The ::after pseudo-element inserts content after the element's content. Here, it adds the text ' - Read more' in blue color after the paragraph text.
The correct selector for the after pseudo-element is li::after. Using one colon :after is old syntax but still works in many browsers. Classes or other selectors like .li::after or li.after do not target the pseudo-element.
The content property is mandatory for ::after to show anything. Without it, the pseudo-element exists but has no visible content, so nothing appears.
::after to appear below the element's text, not inline. Which CSS rule achieves this?p::after { content: 'Note'; /* what to add here? */ }
By default, ::after is inline. Setting display: block; makes it appear on its own line below the element's content.
::after content, what accessibility issue might occur?Content added with ::after is usually not accessible to screen readers. Important information should be in the HTML itself, not only in CSS.