Native lazy loading is part of the HTML specification

Thu 13, Feb 2020

Loading images just as soon as they get into the viewport has been a thing for some time. It is used for performance reasons, as the page loads faster this way. There was no way to do this with plain HTML, though. Now there is! Chrome's loading attribute on <img> tags has made it into the HTML standard.

All you have to do to lazy load an image:

<img src="..." alt="..." loading="lazy">

Keep in mind that only a small number of browsers actually support this feature at the moment!

Why are we using .html instead of .htm?

Fri 27, Dec 2019

The answer to this fascinating interesting question is pretty simple:

You should only use .htm if your OS can't handle filename extensions longer than 3 characters:

All HTML documents should have filenames that end with the extension .html unless the files reside on a DOS system, in which case they should have the extension .htm.

"HTML Manual of Style" by Larry Aronson, 1994

DOS didn't support 4 character long filename extensions. That's why it was recommended to use .htm for DOS.


You are on page 1 right now.

Back to top