In this introductory tutorial, we’ll explore one of the most fundamental concepts in HTML: elements.

But what exactly are elements? Simply put, elements are the building blocks of an HTML document. They are the individual components that make up a web page, and they are what give a web page its structure and meaning!

So, let’s start with the basics. What are the different types of HTML elements? Well, there are dozens of different elements to choose from, but some of the most common ones include:

  • Headings (<h1>, <h2>, <h3>, etc.): These elements define headings and subheadings on your web page.
  • Paragraphs (<p>): These elements define paragraphs of text on your web page.
  • Links (<a>): These elements define links to other web pages or email addresses.
  • Images (img): These elements allow you to add images to your web page.
  • Lists (<ul>, <ol>, <li>): These elements allow you to create unordered or ordered lists on your web page.
  • Tables (<table>, <tr>, <td>): These elements allow you to create tables with data on your web page.
  • Forms (form, input, select, textarea): These elements allow you to create forms for users to interact with on your web page.
  • Divisions (<div>): These elements are used to group other elements together on your web page.

And that’s just the tip of the iceberg! There are many, many more elements available in HTML, each with its own unique purpose and characteristics.

So, how do we use these elements to create a web page? Let’s start with a simple example. Suppose we want to create a web page with a heading, a paragraph, and a link. We could use the following code:

<h1>Welcome to my web page!</h1>
<p>This is a paragraph of text on my web page.</p>
<a href="https://www.example.com">My link!</a>

This code creates a basic web page with a heading, a paragraph, and a link. But what if we want to add more elements to our web page? Maybe we want to add an image, or a list, or a table? We can use the various HTML elements to do just that!

For example, let’s add an image to our web page:

<h1>Welcome to my web page!</h1>
<p>This is a paragraph of text on my web page.</p>
<a href="https://www.example.com">My link!</a>
<img src="my-image.jpg" alt="An image on my web page.">

Or maybe we want to add a list:

<h1>Welcome to my web page!</h1>
<p>This is a paragraph of text on my web page.</p>
<a href="https://www.example.com">My link!</a>
<ul>
 <li>Item 1</li>
 <li>Item 2</li>
 <li>Item 3</li>
</ul>

Or maybe we want to add a table:

<h1>Welcome to my web page!</h1>
<p>This is a paragraph of text on my web page.</p>
<a href="https://www.example.com">My link!</a>
<table>
 <tr>
 <td>Column 1</td>
 <td>Column 2</td>
 <td>Column 3</td>
 </tr>
 <tr>
 <td>Row 2, Column 1</td>
 <td>Row 2, Column 2</td>
 <td>Row 2, Column 3</td>
 </tr>
</table>

As you can see, we can use the various HTML elements to create a rich and engaging web page with all sorts of different components. And this is just the beginning! With CSS, we can style and layout these elements in all sorts of creative and interesting ways.

Wrapping up

And there you have it, folks! HTML elements are the building blocks of the web, and they are what give a web page its structure and meaning. By using the various HTML elements, we can create all sorts of different web pages, from simple and straightforward to complex and dynamic. So, keep experimenting with different elements and see what kind of amazing web pages you can create! And stay tuned for more posts in my HTML basics series.


Tim profile image

A little about me..

Hey, I’m Tim! 👋

I’m a freelance business owner, web developer & author. I teach both new and experienced freelancers how to build a sustainable and successful freelancing business. Check out my Complete Guide to Freelancing if you'd like to find out more.

While you're here, you can browse through my blogs where I post freelancing tips, code tutorials, design inspiration, useful tools & resources, and much more! You can also join the newsletter, or find me on X.

Thanks for reading! 🎉