Performance Basics
All HTML topics∙ Chapter 50
Performance Basics
Fast pages feel professional. HTML has simple performance helpers: lazy loading, proper image sizes, and non-blocking scripts.
| Tip | HTML example | Why |
|---|---|---|
| Lazy images | loading="lazy" | Loads only when needed |
| Decode async | decoding="async" | Better loading behavior |
| Non-blocking JS | <script src="app.js" defer> | HTML renders faster |
| Give sizes | width + height | Prevents layout shift |
📝 Edit Code
👁 Live Preview
💡 Biggest speed win: smaller images + fewer heavy scripts.