HTML - Basic Tags




HTML Basic Tags

We have a basic framework, ready for content. In this section we'll introduce some basic tags which will be useful for creating content.

HTML tags contain three main parts − opening tag, content and closing tag. But some HTML tags are unclosed tags.

Following are the major HTML tags required to write an HTML −

Heading Tag

Most of the write normally start with a heading i.e. ‘head;’ depending upon the write up, heading could be <H1>, <H2>, <H3>, etc.

Example

<!DOCTYPE html>
<html>
 <head> If it is title then
 <title>This is a title</title>
 </head>
 <body>
  <h1>This is heading 1</h1>
  <h2>This is heading 2</h2>
  <h3>This is heading 3</h3>
 </body>
</html>

Result

If it is title then This is a title

This is heading 1

This is heading 2

This is heading 3

Further, if you want to make it italic, bold, or underline then

Example

<b>Bold Tag</b>
<i>Italic Tag</i>
<u>Underline Tag</u>

Result

Bold Tag
Italic Tag
Underline Tag

Paragraph Tag

Paragraph tag structures the text into different paragraphs as −

Example

<p>Paragraph 1</p>
<p>Paragraph 2</p>
<p>Paragraph 3</p>
<p>Paragraph 4</p>
<p>Paragraph 5</p> and so on…

Line Break Tag

The <br /> tag gives break or space between the characters “br” and the forward slash. However, "br" is an empty element.

Horizontal Lines

It is used to break up the sections, as required to arrange the sentence. The <hr> creates a line and breaks the line proportionally.