<div class="article-meta">
<span class="read-time-badge">
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg>
<span id="timeDisplay">0 min read</span>
</span>
</div>
<article id="articleContent" class="content-area">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
<p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<!-- Add more text to see the time change -->
</article>.article-meta {
font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
margin-bottom: 20px;
}
.read-time-badge {
display: inline-flex;
align-items: center;
gap: 6px;
background: #f3f4f6;
padding: 6px 12px;
border-radius: 20px;
font-size: 0.85rem;
color: #4b5563;
font-weight: 500;
}
.content-area {
font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
line-height: 1.6;
color: #1f2937;
max-width: 600px;
}const text = document.getElementById("articleContent").innerText;
const display = document.getElementById("timeDisplay");
const wpm = 200;
const words = text.trim().split(/\s+/).length;
const time = Math.ceil(words / wpm);
display.innerText = `${time} min read`;Nothing to show yetType HTML, CSS or JavaScript and your page appears here.
Click any element to find its code Esc
Check this code before you run it
It came from a shared link. It runs with fewer permissions, so it cannot open pop-ups, submit forms or start downloads.
0.00s / 0.00s
Nothing has animated yet. Hover, click or type in the preview and each CSS animation, transition or
element.animate() call shows up here as it plays.