DevPath · Learn to code ESPTEN

HTML: the structure of the web

Links and images

Attributes

Tags can carry attributes: settings that configure them, in the form name="value", always inside the opening tag. Think of them as an element's options.

Links

The <a> element (anchor) creates a link. Its href attribute indicates the destination:

<a href="https://example.com">Visit Example</a>

Images

<img> displays an image. It is a tag without a closing tag (it has no content): there is no </img>. Its key attributes:

<img src="cat.jpg" alt="An orange cat sleeping" />
Put this into practice

DevPath is a hands-on course: you read the theory here; in the app you put it into practice with exercises that really run, offline.

Start free in the app →
← Headings, paragraphs and listsView the module →