A row of houses with lit windows along an Amsterdam canal

Cet article est également disponible en français

The web gains its strength through diversification: the more accessible it is to everyone, the better the results. The alt attribute was an early example of this, but writing good, accurate descriptive text for your images takes knowing a few rules:

Photograph of rock pool

It appears that a great many developers have jumped on the HTML5 <figure> element and now wrap it around images with abandon, much as people who discover <div> for the first time tend to use it for everything(“Box all the things!”). This is incorrect: <figure> is not appropriate for all images.

The question to ask before using <figure> is:

“If I took this <figure> out of its current context and used it someplace else, would it explain itself?”