SuperAsk
man looking at the screen

What Are The Basic HTML Tags?

If you are planning to become a programmer, you have to learn what are the basic HTML tags? We believe that most of you have already worked with HTML tags. However, some of you have just started to learn this markup language. For that reason, we have prepared this article to remind you of the basics of HTML.

Is HTML a programming language? The answer is not. The name HTML stands for HyperText Markup Language. To better understand the term, let’s break it down.

Hypertext refers to any text link (hyperlink) that exists on a web page. At the same time, markup language refers to text tags. In other words, a markup language is a specific structure of text tags that make up each HTML document.

You can’t see HTML tags on a web page. They are actually the structure of every website followed by elements created by CSS and JavaScript.

If you have ever considered becoming a web developer, the first step is to learn HTML tags. Find out what you should learn after HTML and CSS.

Learn Basic HTML Tags

You can use any text editor to write HTML code. However, the most popular free code editors are Notepad++ and Visual Code Studio. Of course, you can choose any other. There is no difference between these code editors, except for some differences in style that don’t affect the final result of your code.

To check the outcome of your code, you can use any browser. Here is the list of the basic HTML tags:

1. The Basic Structure of a Website

closing html tag

As we said earlier, the HTML structure contains tags that are written in the following format <tag name> Your content… </tag name>. 

<!DOCTYPE html>
<HTML>
<head>
<title> This is the name of my website </title>
</head>
<body>

<h1> My first heading </h1>
<p> This is my first paragraph. </p>

</body>
</html>

This is the basic structure along with the tags that every website has. The basic structure contains the most crucial HTML tags such as the HTML tag, head tag, and body tag. Read the whole article, to find out more about these tags and how to use them!

2. Doctype Tag

Before you start writing your HTML code, it is important to understand the tags from the basic structure. As you can see the first tag is the DOCTYPE tag. But what does it mean?

By using the <!DOCTYPE html>, we are telling the browser that our HTML document is going to use the latest version of HTML. In this case, this is HTML5.

It is no longer necessary to use the document type tag today because all search engines automatically recognize the version of our HTML document. However, it is always a good practice to adhere to this standard.

3. HTML Tag

Each HTML document must begin with the opening <html> tag and end with the closing  </html> tag. This gives the browser information about where the HTML document begins and ends. In HTML5, this tag can be omitted, but it is a good practice to include it in your HTML document.

4. Head Tag

The header (<head>) is the header of your HTML document. It contains the <title> tag, and can also contain links, JS scripts, CCS styles, metadata, etc.

For example, this is the place where you can write your CSS and JavaScript code. However, to get rid of redundant code, developers usually create external CSS and JavaScript documents and place links to them here.

5. Title Tag

Each HTML document should have a name. When you write the name of your website between title tags, it should appear on a browser’s tab. For instance, you can write something like this: <title> This is my online store </title>.

6. Body Tag

Each HTML document should also contain the body tag (<body>). The body tag wraps everything that should be displayed in the browser window, such as paragraphs, images, links, sections, etc.

7. Heading Tag

The heading tag has six tags, from H1 to H6. Keep in mind that the H1 tag is the most important while the H6 is the least important. Also, the H1 tag has the largest font while the H6 has the smallest.

8. Paragraph Tag

Below the heading tag, we usually use the paragraph tag. For example, we can use the heading tag for the name of our article and the paragraph tag to add content. As its name suggests, the paragraph tag (<p>) indicates the part of your HTML document in which some text is written.

Example: <p> This is the first sentence of my article. </p>