What Elements Count Toward LCP
What you'll learn: Which specific HTML elements browsers actually consider when calculating your page's Largest Contentful Paint score.
When browsers measure LCP, they don't track every element on your page—that would be chaos. Instead, they focus on a specific shortlist of element types that typically represent the main content users care about.
Elements Included in LCP Measurement
The browser only considers these element types for LCP:
<img>elements – Standard image tags<image>elements inside<svg>– SVG image elements<video>elements – Specifically the poster image (the thumbnail shown before play)- Block-level elements containing text nodes – Headings, paragraphs, divs with text, etc.
- Elements with a background image loaded via CSS – But only if they contain text or other inline-level content
Think of it like a talent show where only certain acts can compete for "most impressive." Background decorations, icons, and logos usually don't make the cut—the browser wants to measure the hero content that draws the user's attention.
What Doesn't Count
Notably excluded:
- Elements with
opacity: 0orvisibility: hidden - Elements that take up the full viewport (likely backgrounds)
- Very small images (less than 4% of the viewport)
Why This Matters
Understanding which elements qualify helps you optimize the right things. Your hero image or main heading is likely your LCP element. Optimizing a tiny logo won't help LCP, but lazy-loading your hero image could hurt it significantly.
The browser continuously updates which element is "largest" as the page loads, stopping when the user first interacts or the page fully loads.
Key Takeaway: Only images, videos (poster), SVG images, and text-containing block elements count toward LCP—focus your optimization efforts on these visible, above-the-fold content elements.