Largest Contentful Paint (LCP) Explained
You'll learn: What LCP measures, which elements count, and when this crucial performance metric is recorded.
What Is Largest Contentful Paint?
Largest Contentful Paint (LCP) measures the time it takes for the largest visible content element in your viewport to fully render. Think of it as measuring when your page's "main star" appears—the hero image, the headline block, or whatever dominates the screen when someone first visits your page.
LCP is like watching a play: you're not timing when the curtain opens (that's First Paint), but when the lead actor walks onto the stage and becomes visible to the audience.
What Elements Count as "Contentful"?
Not everything on your page is considered for LCP. Only these elements qualify:
<img>elements<image>elements inside<svg><video>elements (the poster image)- Elements with background images loaded via CSS
url() - Block-level elements containing text nodes
Notably, interactive elements like buttons or form inputs don't count—LCP focuses on content, not controls.
When Is LCP Recorded?
LCP is measured from when the page starts loading until the largest visible element is fully rendered. Critically, the "largest" element can change as content loads. Your LCP might initially be a text heading, but once your hero image loads, that becomes the new LCP element—and that later timestamp is what counts.
The browser stops looking for new LCP candidates after the first user interaction (click, scroll, or keypress), ensuring the metric reflects the initial loading experience.
Key Takeaway: LCP measures when your page's most prominent visible content appears, focusing on images, videos, and large text blocks—the elements users immediately notice when your page loads.