HTML tags | HTML tutorial

HARSH VATS - Jul 15 '20 - - Dev Community

We saw in the previous article about html basics. Now we will see some very common tags used inside body tag. Html tags are used like this <tag></tag> or <tag /> (called self-closing tag). Self closing tags does not require text inside them like <img />, <input />. However other tags require like click me </btn>.

<h1>

You can have 6 different sizes of headings ranging from h1(largest) to h6(smallest).

<div>

This tag is the mostly used tag. As the name suggest, it is the division in html document. By default it starts from left side and cover the whole page but you can set it's size as you wish.

<p>

This is paragraph tag used for writing paragraphs. However you can use div instead of p tag without any problem.

<span>

This tag is used to specify a specific (generally small like a word) portion of the text.

<br/>

This breaks a line for you. In html you cannot move to the next line just by pressing enter. This tag does the work for you.

<hr/>

This tag creates a horizontal line for you.

<button>

This tag is used to create buttons.

There are many more tags like these but I cannot cover all of them here. I will discuss each of them slowly. In next article we will learn about how to style your html page which will take your excitement level to some more heights. :)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player