Introduction to HTML Tags

 



HTML Document is defined by HTML tags only. An HTML file is created with HTML tags only.

HTML Tag is a simple word or letter. Which is surrounded by Angular Brackets ( <> ). Thus a simple word/letter and Angular Brackets create an HTML Tag. Some examples are given below. You will understand HTML Tag easily by reading them.

Example 1

The form is a simple word. Form Tag is used to creating a form in an HTML Document. To create a Form Tag in HTML Language, writing the form word between Less Than and Greater Than creates HTML Form Tag. Which will be written like this 

<form>Content goes here......</form> 

Example 2

Paragraph Tag is designed to write a paragraph in an HTML document. In which only the word P is used. Which creates the Paragraph Tag. Here the letter P is written between Less Than and Greater Than. Paragraph Tag is written as follows.

<p>Text.........</p>

Example 3

Bold Tag is used to making the text bold. Only B of the word Bold is used to create a Bold Tag. Here the letter B is written between Less Than and Greater Than. It is written like this. 

<b>Text........</b>

HTML Tag is named after the rules they define. Therefore, the use of that particular tag is also easily known by the name of Tag. After working with HTML tags for a few days, you become familiar with HTML tags.

The text to which the HTML Tag is applied. That text becomes Mark by the name of the same Tag. That is, the text written between <p>… </p> identifies it as Browser Paragraph. That's why HTML is called Markup Language.

Syntax of an HTML Tag 

An HTML tag consists of three parts:

  1. Opening Tag
  2. Text
  3. Closing Tag

Opening Tag

Opening Tag is also called Start Tag. The task of Start Tag is to tell Browser that this Rule Define is happening now. So that the browser can read that tag correctly. The Opening Tag is written as follows.

<tag name>

Text or Content

Text is that information; Which Webpage is written in. The information or information you want to tell your users. That text is written here. After writing the text, the Syntax looks like this.

<tag name> Text or Content......

Closing Tag

Closing Tag is also called End Tag. With End Tag, the browser is informed about the Define Rule's termination by the Opening Tag. These three elements together make up the Syntax of an HTML Tag. They are written together in this way. This is the complete Syntax of an HTML Tag.

<tag name> Text or Content......</tag name>

Forward Slash ( / ) is used to make the Closing Tag different from the Opening Tag.

Not all HTML tags have the same Syntax. The Syntax Paired Tags mentioned above are used. However, some HTML tags are stand-alone. These are called Empty Tag.