Practical Exercise 5: Implementing Images in HTML
In this practical exercise, you will learn how to insert and configure images in HTML using the <img> tag and essential attributes such as src, alt, width, and height to improve accessibility and visual presentation.
Activity
Create an HTML document that includes an image using the <img> tag and its alt, width, and height attributes. The image can be from a source external to your website.
Interactive Solution
Solution with complete HTML code
HTML
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<title>Imágenes</title>
</head>
<body>
<h1>Imagen</h1>
<img
src="https://docs.div.zone/img/divzone-social-card.jpg"
alt="Descripción de la imagen"
width="360"
height="200"
/>
</body>
</html>