What are Basic HTML Tags

html

Basic HTML tags

An HTML tag is used to tell the browser that the text contained between <html> and </html> is a web page and can be viewed in a web browser. Every web page coding must start with <html> and end with </html>. An HTML tag is a container tag.

Head Tag

A Head tag is used to define the header area of your web page. The information given in a Head tag tells the computer that this information is not to be shown on the web page. It is a container tag used in pairs as <head> and </head>. Every web page coding must have its header specified.

Title Tag

A Title tag is used to tell the browser that the text contained between <title> and </ title> is the text that does not form part of the web page. It will be shown on the Title bar or the Title tab of your web browser. The use of a Title tag is not mandatory. If you do not want to give title to your web page, your web browser will show the file name and its path as title of your web page.

Body Tag

A Body tag is used to tell the web browser that the text contained between <body> and </body> is to be shown on the web page. It is also a container tag.

A Body tag can be used with the following attributes:

  • BGCOLOR: This attribute allows you to define a color for the background of your web page. It can be used as under: <body bgcolor=”red”>
  • TEXT: This attribute allows you to define a color for the text of your web page. It can be used as under:

<body text=”blue”>