How to Add HTML Elements to a Web Page

We will demonstrate how to add some of the mostly used HTML elements to a web page in this tutorial.

Thumbnail Blaster - Video Thumbnail Creation Software

Everything you see on a web page is made of HTML elements. To add an HTML element to a web page, you simply add the opening tag, the content of the element and the closing tag like the following:

<p>This is a paragraph.</p>

The above code represents a paragraph element in HTML and you will see how it is constructed below.

HTML CodeDescription
<p>opening tag
This is a paragraph.content
</p>closing tag

Some HTML elements have self-closing tags like the image element.

<img src="myimage.jpg">

In the example below, you will see a number of HTML elements that are used commonly in web pages:

<!DOCTYPE html>
  <title>Alex's Website</title>
  <p>Hi, I am Alex and this is my website about cats.</p>
  <p>Here is a picture of my cat:</p>
  <img src="cat.jpg">
  <p>Please click the link below to learn more about me:</p>
  <a href="about-me.html">About Me</a>

The above example demonstrates the following HTML elements:

HTML ElementDescription
<img src="...">image
<a href="...">...</a>link

You can create a basic web page and put the above code into that page and see how it works. You can replace the image file, cat.jpg, as you wish.

Was this post helpful?

Please consider sharing it, and supporting us with a small tip. Thank you :)

f t g+ in