Starlit Daily

📚 › HTML: build the structure of a web page

7. Images

Este artículo se traducirá automáticamente. Por ahora se muestra en inglés.

The img element shows a picture. src holds the file address, alt holds a short description, and width sets the size.

Always write alt text. Screen readers read it aloud for people who cannot see the picture, and search engines use it too. img has no end tag.

Ver ejemplo

<img src="https://example.com/cat.jpg" alt="A cat sleeping on a chair" width="300">

✍️ Ahora te toca

Add an image from https://example.com/logo.png with the alt text Company logo.

← Volver al curso