HTML tags are standards statement or code (Tag Name) enclosed by angular brackets that can be used for display contents of web page in browsers. The content can be of any type like text content, media, content, image content and any other content. HTML tag is not only used for displaying content in a web browser, but it also creates the structure of the web page and web application.
A tag staring from
Less Than Angular Bracket (<) and end with a
greater than angular bracket (>) like <title>. HTML tags usually come in pair means mostly each tag have its correspondent closing tag like <body>... </body>.
Tags are also known as HTML elements with some text. Tags are used for displaying any content on the web page, in HTML language; most of the tags have its corresponding closing tag.
There are two types of HTML tags, which are given below.
1. Paired Tags
2. Unpaired Tags
Paired Tags
The
paired tags consist of two tags , they are generally comes in pair like <span> and</span>. The first tag in a pair is called
start tag and the second tag with a forward slash ( / ) is called the
end Tag.
Syntex
<Tagname>content will come here</Tagname>
Start Tag |
End Tag |
The tags are those tags that start with less than angular bracket and closed with greater then angular bracket.
Example: <Span> This is a opening tag.
|
The tags are those tags start with less than angular bracket and close with greater then angular bracket including with “ / ” (forward slash).
Example: </span> This is a opening tag.
|
|
|
Example
<body>………. </body>
<b>This text is bold</b>
<p>Define a text paragraph in web page.</p>
Note:
The Start tag
is also known as Opening tag. and the End tag is also known as Closing tag.
Unpaired Tags:
Those tags are starting with a less than angular bracket and close with a greater than angular bracket including with “ / ” (forward slash) is called unpaired tags like <br/>, <hr/>.
The Unpaired tags don’t have its corresponding closing tag. Unpaired tags are also known as Singular or Stand-Alone Tags.
Syntex
<tagname/>
Example
<br/>, <hr/>
Importents Points
- HTML tags are not case sensitive, <a> means the same as <A> or <DIV> same as <div>.
- HTML tags are surrounded by the two characters < and >.
- The first tag in a pair is the start tag, the second tag is the end tag.
- The text between the start and end tags is the element content.
- HTML tags mostly come in pairs like <p> and </p>.
- The surrounded characters are called angular brackets.
- HTML tags are used to mark-up HTML elements for display content in web page.
Nature of Tags
We can differentiate tags based on the purpose they used. Basically we have three types here
Formatting tags
We manage the size of the font, underline part of the text, make the text bold etc by using tags like
, ,etc.
Tool to create your own basic HTML page with tags
Page Structure tags
Description , title , head , body etc are part of the page structure tags. They are part of the basic html page and does not directly affect the formatting of text or image.
Control tags
Form tags, Script tags, Radio buttons etc are part of the control tags