A picture and a link
Section 1: HTML: the page's contentLesson 1.4 · ⏱ 7 min
<img src="…" alt="…"> is a picture: src is its address, and alt describes it. And <a href="…"> is a link that takes you to another page.
HTML
<h1>My page</h1>
<img src="https://roboegypt.com/assets/logo-light.png" alt="Robo Egypt logo">
<p><a href="https://roboegypt.com">Visit Robo Egypt</a></p>
CSS
body { font-family: Tahoma; }
img { width: 120px; }
🖥️ The page in Robo Web:

📌 Another example: a picture that is a link
We put the picture inside the link, so clicking the picture opens the website.
HTML
<h2>Click the logo 👇</h2>
<a href="https://roboegypt.com" target="_blank">
<img src="https://roboegypt.com/assets/logo-light.png" alt="Robo Egypt logo">
</a>
CSS
body { font-family: Tahoma, sans-serif; }
img { width: 160px; }
🖥️ The page in Robo Web:

✍️ Practise
A picture and a link.
✍️ Practise here in the lesson✖ Close the labor open the lab in a new page ↗
🎯 Challenge yourself
Easy
A picture 100 pixels wide, with an alt.
👀 Show the solution🙈 Hide the solution
HTML
<img src="https://roboegypt.com/assets/mark-light.png" alt="Robo">
CSS
img { width: 100px; }
🖥️ The page in Robo Web:

Result: a small picture.
Medium
A link that opens in a new tab: target="_blank".
👀 Show the solution🙈 Hide the solution
HTML
<a href="https://roboegypt.com" target="_blank">Visit Robo Egypt ↗</a>
CSS
body { font-family: Tahoma, sans-serif; }
🖥️ The page in Robo Web:

Result: a blue underlined link.
Hard
Two pictures side by side, with two links under them.
👀 Show the solution🙈 Hide the solution
HTML
<img src="https://roboegypt.com/assets/mark-light.png" alt="1">
<img src="https://roboegypt.com/assets/logo-light.png" alt="2">
<p>
<a href="https://roboegypt.com">Website</a> |
<a href="https://roboegypt.com/lab">Lab</a>
</p>
CSS
body { font-family: Tahoma, sans-serif; }
img { width: 120px; }
🖥️ The page in Robo Web:

Result: two pictures and two links.

