Skip to content

Text, Links & Images

1 min read3 lessons in topic

Learning objective

By the end of this lesson you will be able to add headings, paragraphs, links and images to a web page.

A useful web page is made of more than a single heading. This lesson covers the most common HTML elements: text containers, hyperlinks and images.

Text elements

<h1>About Me</h1>
<h2>My Studies</h2>
<p>I study Information Technology at UENR.</p>
<p>I enjoy <strong>building</strong> things for the web and <em>learning</em> new tools.</p>

h1–h6 create headings, p creates a paragraph, strong makes text bold and em makes it italic.

Links

<a href="https://uenr.edu.gh">Visit UENR</a>

The a element creates a hyperlink. The href attribute tells the browser where the link goes.

Images

<img src="photos/me.jpg" alt="A photo of me" width="300">

img embeds a picture. The src attribute is the image location and alt provides a text description for screen readers and for when the image cannot load.

  • Use semantic tags (h1–h6, p, strong, em) instead of styling plain text
  • Always give images a descriptive alt attribute
  • Write link text that says where the link goes

Practice exercise

Build an About Me page with your name as a heading, one paragraph, a link to your favourite website and an image.

Check your understanding

1. Which element creates a hyperlink?

2. Which attribute provides alternative text for an image?

Self-graded — answer then check below.