Simon Willison: TILs on html

Atom feed for html

html Lazy loading images in HTML - 2022-11-26

Most modern browsers now include support for the loading="lazy" image attribute, which causes images not to be loaded unti the user scrolls them into view. …

html HTML datalist - 2022-11-14

A Datasette feature suggestion concerning autocomplete against a list of known values inspired me to learn how to use the HTML <datalist> element (see MDN). …

html HTML video that loads when the user clicks play - 2022-09-29

Today I figured out how to use the <video> tag to show a static thumbnail that gets replaced by the loaded video only when the user clicks play. …