Introduction to html tags and html syntax HTML tags and HTML syntax are some signs and words which are used for representing web page conte...
Introduction to html tags and html syntax
HTML tags and HTML syntax are some signs and words which are used for representing web page contents to user browser. This also known as Markup tag.HTML keywords are bound in between angle bracket <(Less than sign) and the > (Greater than sign).
For example in html there is a tag called HEAD tag. We have write that tag like this
<head>. Another tag is TITLE tag. We write like this <title>.
Some rules for writing html tags
- Starts with “<” (Less than sign)
- Than we have to write tag name.
- At last we have to complete that tag by “>” (Greater than sign)
Example:<br>, <i>, <p> etc.
We have to use many types of tags in html.
Most of the tags have two parts. Few tags have only a single part. Two parts are,
- Opening tag
- Closing tag
01. Opening tag
By the opening tag the text starts. In this type of tag have to write tag like this
- At first “< “(Less than sign)
- Now have to write the tag name.
- At last”> “(Greater than sign).
Example: <body>, <b>, <i>
02. Closing tag
By the closing tag text is closed. In this type of tag have to write tag like this
- At first “<” (Less than sign)
- Have to give “/” (Front slash)
- Now have to write the tag name.
- At last”>” (Greater than sign).
Example: </body>, </b>, </i>
HTML tag basic syntax example
Types of HTML tag
- Container tag
- Empty tag
01. Container tag
Those tags which contains content and it has opening and closing both tag those are called container tag.
Example:<p>, <body>, <head>
02. Empty tag
These type of tag has opening tag but has no closing tag. Also it doesn't contains any content. These are called empty tag.
Example:<br>, <hr>
We have to follow some rules on writing html tags.
- We have to write the correct spelling of the tag, otherwise we will not get expected correct outputs.
- Now the tags are written by using small letters.
- If we are using container tag we have to ensure that we have closed that container tag.




No comments