Building Your Learning Module...
Getting things ready for you!
Find videos you like?
Save to resource drawer for future reference!
::before and ::after pseudo-elements to insert content before or after an element without touching HTML. Perfect for decorative elements, icons, tooltips, and dynamic content!Add visual elements without extra HTML
Display attributes or counter values
Keep markup semantic and minimal
Add content without touching HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS Generated Content Basics</title>
</head>
<body>
<div class="container">
<h1>✨ Generated Content</h1>
<p class="subtitle">Add visual elements with CSS pseudo-elements</p>
<div class="badge">Premium Feature</div>
<div class="quote">
CSS generated content allows you to add decorative elements without cluttering your HTML.
</div>
<div class="card">
<h3>Featured Content</h3>
<p>This card has a rotating star added with ::before pseudo-element.</p>
</div>
<p style="color: #64748b; text-align: center;">
Learn more at our <a href="#" class="link">documentation page</a>
</p>
</div>
</body>
</html>Loading preview...
Inserts content BEFORE the element's content
Inserts content AFTER the element's content
Required to display anything - even empty ""
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Advanced Generated Content</title>
</head>
<body>
<div class="container">
<h1>🎨 Advanced Generated Content</h1>
<div class="demo-section">
<h3>Interactive Tooltips</h3>
<p>
Hover over <span class="tooltip" data-tooltip="This is helpful information">this text</span>
to see a tooltip created with ::before and ::after pseudo-elements.
</p>
</div>
<div class="demo-section">
<h3>Fancy Button</h3>
<a href="#" class="btn"><span>Click Me</span></a>
<p style="margin-top: 1rem; font-size: 0.875rem;">Hover to see the ripple effect created with ::before</p>
</div>
<div class="demo-section">
<h3>Form with Required Fields</h3>
<div class="form-group">
<label class="form-label required">Email Address</label>
<input type="email" class="form-input" placeholder="your@email.com">
</div>
<div class="form-group">
<label class="form-label required">Password</label>
<input type="password" class="form-input" placeholder="Enter password">
</div>
</div>
<div class="demo-section">
<h3>Status Indicators</h3>
<div>
<span class="status success">Success</span>
<span class="status warning">Warning</span>
<span class="status error">Error</span>
</div>
</div>
</div>
</body>
</html>Loading preview...
Display HTML attribute values dynamically
Created with positioning and transitions
Ripples, glows, and animations
content: "text";StringInsert plain text
content: attr(data-label);DynamicDisplay HTML attribute value
content: counter(name);CounterDisplay counter value
content: url(icon.svg);ImageInsert image or SVG
content: "";EmptyEmpty content (for decorative elements)
content: "★" " " attr(rating);CombinedCombine multiple values with spaces