Resource Loading

loading="eager"

Requests normal immediate resource loading rather than viewport-based deferral. Use for important above-the-fold images; it does not itself increase fetch priority. On img and iframe, and on audio and video in the current HTML Living Standard; media-element implementation must be checked separately. For these elements, missing or invalid values default to eager. Browser heuristics determine actual timing. The example uses a tiny inline asset, not a network benchmark.

Formal Syntax & Structure

html syntaxhtml
loading="eager"

Parameters & Attributes

NameTypeDescription
loadingkeywordRequests normal immediate resource loading rather than viewport-based deferral. Use for important above-the-fold images; it does not itself increase fetch priority.

Working Example

Example Snippethtml
<img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNjAiIGhlaWdodD0iMTAwIj48cmVjdCB3aWR0aD0iMTYwIiBoZWlnaHQ9IjEwMCIgZmlsbD0ibGlnaHRibHVlIi8+PGNpcmNsZSBjeD0iODAiIGN5PSI1MCIgcj0iMzAiIGZpbGw9Im5hdnkiLz48L3N2Zz4=" alt="Blue circle on a light blue background" width="160" height="100" loading="eager">
HTML Reference