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 /> (called self-closing tag). Self closing tags does not require text inside them like
<input />. However other tags require like click me
You can have 6 different sizes of headings ranging from h1(largest) to h6(smallest).
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.
This is paragraph tag used for writing paragraphs. However you can use div instead of p tag without any problem.
This tag is used to specify a specific (generally small like a word) portion of the text.
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.
This tag creates a horizontal line for you.
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. :)
Top comments (4)
<btn>doesn't exist. Button tag is
<input>don't need a backslash.
Can i use hr tag? Maybe, best way to create line is css?
Depends on the destination. If just for beauty, then use styles. If you need semantics and thematic break, then use
You can create a line with CSS by specifying a border-bottom for a section in the document, like this:
border-bottom: 5px solid green;