MicrolearnENPTES

Images and attributes

Lesson 3 of 20 · Web.Micro

Pictures make pages come alive. `<img>` needs a source and, always, a text alternative.

<img> has no content and no closing tag. src says which file to show; width and height reserve space so the page does not jump while it loads. Here the image is an SVG drawn by the page itself.

Check yourself

What does alt provide?

Do it in the browser: a real HTML, CSS and JavaScript tool, a short mission and instant feedback. No install.

Start this lesson — free
← Links and listsPage structure →

All lessons · Web.Micro