Content inserted with ::before
is inserted before other content within the element and is displayed inline by default. The content value is specified using the content
property.
element::before { content: "text" }
Element - this can be (for example) - class, id and other selectors.
Content - it can be (for example) - a word, a link, a color, and other properties.
added before | <p class="your-class"> | New content is added to CSSPortal. | </p> |
Add an icon before each item.
<h3>Seasons:</h3>
<q>Winter</q>
<q>Spring</q>
<q>Summer</q>
<q>Autumn</q>
q::before {
content: "🌟";
}
Winter
Spring
Summer
Autumn