|
Back to HTMLhtml Lesson 3

Links & Images

Connect your pages and add visual content.

Hyperlinks

The `<a>` tag defines a hyperlink. The `href` attribute specifies the URL of the page the link goes to.

html
<a href="https://www.google.com">Visit Google</a>

Try it yourself:

HTML
CSS
Result

Images

The `<img>` tag is used to embed an image. It is a self-closing tag and requires `src` (source) and `alt` (alternative text) attributes.

html
<img src="image.jpg" alt="A beautiful scenery">

Try it yourself:

HTML
CSS
Result