Skip to main content

22 docs tagged with "performance"

View all tags

Core Web Vitals in Depth

Understand the three Core Web Vitals in depth: what LCP, INP and CLS measure, how each is made of parts you can fix, how to measure them in the lab and the field, and which HTML changes move each number. Includes a breakdown lab and a layout shift calculator.

Critical Resources in HTML

Learn how to find the few files that decide how fast your page feels: the critical rendering path, dependency chains, render-blocking CSS and fonts, and the techniques that shorten them. Includes a chain lab and a critical-or-not quiz.

DNS Prefetch in HTML

Learn link rel=dns-prefetch: a tiny, cheap hint that looks up a server's address early. See what DNS is, what the hint saves, how it differs from preconnect, and which hosts deserve it.

HTML Image Width and Height

Learn how the width and height attributes stop layout shift in HTML. Understand aspect ratio, how browsers reserve space, responsive sizing with CSS, the aspect-ratio property, high-density screens, and Cumulative Layout Shift on CodeHarborHub.

HTML Lazy Loading Images

Learn how to lazy load images in HTML with the loading attribute. Understand which images to lazy load and which not to, protect your main image, reserve space with width and height, lazy load iframes, use IntersectionObserver, and measure the results on CodeHarborHub.

HTML Performance Basics

Learn the HTML habits behind a fast page: keep the head light, never block on scripts, size and lazy-load images, and ask four simple questions about every file. Includes a live page checker.

HTML Performance: Making Pages Load Fast

Start learning web performance with HTML: how a browser loads a page, what blocks it, which HTML attributes and tags speed things up (preload, preconnect, defer, async, lazy loading, responsive images), the Core Web Vitals, and a map of every lesson in this section. Includes a loading timeline simulator, a Core Web Vitals quiz, and a which-tool-fits matcher.

Image Formats for the Web

Learn which image format to use on the web. Compare JPEG, PNG, GIF, WebP, AVIF and SVG, understand lossy and lossless compression, transparency and animation, browser support, optimization tools, metadata privacy, and how to choose the best format on CodeHarborHub.

Lazy Loading for Performance

A performance-first guide to lazy loading: which images, iframes and videos to defer, which to never defer, how to avoid layout jumps, and how to audit a page. Includes a scroll lab and a live lazy-loading checker.

Preconnect in HTML

Learn link rel=preconnect: open the connection to an important server early. Understand why crossorigin matters, how many to use, and how to pick the right origins, with a connection lab and an origin picker.

Prefetch in HTML

Learn link rel=prefetch: quietly download files for the page a visitor will probably open next. See when it pays off, when it wastes data, and what must never be prefetched.

Preload in HTML

Learn link rel=preload: fetch the files your page needs but finds late, such as fonts and CSS background images. Includes a discovery timeline and a checker for as and crossorigin mismatches.

Resource Hints in HTML

Learn what resource hints are and how to choose between dns-prefetch, preconnect, preload and prefetch. Includes a hint builder and a live checker for common mistakes.

Responsive HTML Video

Make HTML video fit every screen: width and height attributes with max-width and height auto, the CSS aspect-ratio property, object-fit and object-position, responsive iframe embeds, preventing layout shift, saving data on mobile, vertical video, and common mistakes, with live resizable demos.

Responsive Images and Performance

Learn how srcset, sizes and picture affect page speed: how the browser picks an image, why a wrong sizes value wastes data, which formats save bytes, and how to audit a page. Includes a selection lab and a live image checker.

Responsive Images in HTML

Learn the big picture of responsive images in HTML. Understand screen sizes and pixel density, flexible images with CSS, resolution switching with srcset, art direction with the picture element, fluid galleries with CSS grid, and how to test what the browser downloads on CodeHarborHub.

Script Loading and Performance

Understand what a browser does when it meets a script, why JavaScript is the most expensive kind of file, and how to load it without blocking the page. Includes a script order lab and a script weight lab.

The async Attribute

Learn how the async attribute works, why it suits independent scripts like analytics, and why it causes flaky bugs when scripts depend on each other. Includes a race condition simulator and a which-mode quiz.

The defer Attribute

Learn exactly how the defer attribute works: when deferred scripts download and run, what order they keep, which bugs appear when you add it, and how to move an old page to defer safely. Includes a run order simulator and a migration helper.

The HTML Head Element

Learn what belongs inside the HTML head element, what does not, and what the browser does when you break the rules. Includes a live parser lab that shows where the browser really puts each element, and a simulation of how script loading affects your page.

The HTML Link Element

Learn the HTML link element: how it connects your page to stylesheets, icons, canonical addresses, translated versions, feeds, and performance hints like preload and preconnect. Includes a live stylesheet lab, a real link-tag checker, and an hreflang builder.

The HTML Script Element

Learn the HTML script element: inline and external scripts, defer, async and type module, where to place scripts, data blocks like JSON-LD, noscript fallbacks, and how to load JavaScript safely. Includes a live loading-order experiment, a script tag checker, and a JSON data block demo.