Lesson 3: More HTML

Adding Images

To make a website visually interesting, we use the <img> tag. This tag is special because it doesn't have a closing tag. Instead, it uses an attribute called src (which stands for source) to tell the browser where the picture is.

[Image of HTML image tag syntax showing src and alt attributes]
<img src="eagle.jpg" alt="A bald eagle flying">

Creating Links

To connect web pages, we use the anchor tag: <a>. You use the href attribute to tell the browser exactly where to go when the link is clicked.

<a href="https://www.hba.net">Visit the HBA Website</a>

Test Your Knowledge!

Challenge 1: The Invisible Image

A student wrote this code to show a picture of a keyboard, but nothing is showing up on the screen! What attribute is missing?

<img="keyboard.jpg">
Click here to reveal the answer
It is missing the "src" attribute!

<img src="keyboard.jpg">