Web Design

Basic Text

The different types of text in HTML

What is HTML?

HTML stands for Hyper Text Markup Language. It allows you to place links, text, images, and more. Let’s start off with setting up our file.

Setting up our file

Your index.html file should be empty. Let’s get our file setup. Type in the below:

<!doctype html>
	<title>My First Website</title>

What does this do?

The first line tells the browser to start reading the file as HTML. It basically says Document Type is HTML. Whenever you write html, we create open and close tags. <html> opens the html file, and </html> closes the html file, showing where all the code ends.

The <head> opens what is known as the header. In the header, we can add favicons, and different packages to use. Inside of the header, we put <title> which gives use a tab title. The title says My First Website. After closing the title, we close the header. Whatever we put in the header will not be on the physical page. After the header, we open the body, like this: <body>. Everything that goes into here will show up on the page. Below, we will add text to the page.

Different Types of Text

There are many different ways to write text in HTML. We are going to be focusing on the main ways right now.


To write in paragraph text, open <p> and write what you want. Here is an example below.

    <p>This is my first paragraph!</p>


There are also headings, which is different than the header. There are 6 different types, shown below.

<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>

That's it!

And with that, you know the basics to types of text in HTML. Next, we will add links and images to our page.