What are HTML Tags

HTML tags are the instructions that are directly embedded in the HTML document. An HTML tags is the backbone of web browser and that the Html tags are must the responsible to show the website without them there would be no website. 
 
 
what are HTML Tags

 
 
This tag is used to what kind of web technologies are using in the website like PHP, Python, JavaScript…etc. .Html tag helps to find the script to show the page on the internet. without these tags, there are no websites and internet. 
 

 

What are HTML Tags? 

 
Html tags are pre-defined elements in HTML, we can't create new and the tags are enclosed within these angle brackets < > less than and greater than. The angle brackets between the tag must be used to define the element in HTML. 
 
For example : <html> , <div>, <script>

All these tags are having a particular work and special function Example: <i> tag is defined as italic on the website, and <b> this for bold, <table> tag displays a table in the website.

There are two types of HTML tags: 
 
  • paired tags
  • unpaired tags

Paired tags 

 
Paired tags are the tag that consists of placed between a tag and its companion tag. In paired tags are starting with an opening tag < > that tag name enclosed with inside the angle brackets . Example: <strong> and opening tag which as ends with a closing tag followed by a slash. Example: closing tag </strong>. 
 
And unordered list is is defined as <ul> used to bullet list opening tag <ul> and closing tag </ul>
 

Example:


  <strong>dailyaspirants.com</strong>

  <i>is a openingtag.<b> is a closing tag.
  

Output:

dailyaspirants.com

 

List of few paired tags: 

 
opening tag closing tag
<html> </html>
<head> </head>
<body> </body>
<form> </form>
<div> </div>
<table> </table>
<span> </span>
<style> </style>
<pre> </pre>
<code> </code>
<td> </td>
<ul> </ul>

 

Unpaired Tags


unpaired tags are single tag or stand-alone tag which does not have a closing tag. These tags are otherwise called singular tags and are also called non-container tags
 
This tag does not have any content and we can't. But this tag is also a powerful tag in HTML. so, the unpaired tag is closed after adding a slash (/) before the sign of greater than > 
 

For example: 

 
<br/>,<hr/> 
 
<br/> tag is a line-break in text.It is an empty tag. 
 
<hr/> tag is a horizontal rule and it is used to divide or a separate document. It is also an empty tag
 

Few Unpaired tags are:


Opening tag:
<br>
<hr>
<meta>
<link>
<input>


Some Examples with Html tags 

 

HTML Image Tag 

 
HTML Image tag is used to add the images in the html websites or documents .Html image tag is and 'src' is the attributes to give the path of the image location. using to control by the attributes image is width and height in 'px'. 
 
And some time image will not shown on website for some reasons that time used alternative case called 'alt'. The 'alt' is used to add what kind of image and given information about the image.

<!DOCTYPE html>
<html>
<head>
<title>HTML Image Tag</title>
</head>
<body>
<img src="htmltag.jpg" width="500" height="500px" alt="HTML tags"> 
</body>
</html>
  

Output: 

 

HTML paragraph Tag 

 
Paragraph are represented as <p> html element tag and closing end tag with </p> gives the text inside it. It is show display the text in the website.

<!DOCTYPE html>
<html>
<head>
<title> HTML Paragraph Tag </title>
</head> 
<body> 
<p>First Paragraph </p>
<p>Second Paragraph </p> 
<p>Third Paragraph </p> 
</body> 
</html> 


output:


First Paragraph
Second Paragraph
Third Paragraph
  

Html Anchor Tag 

 
HTML Anchor Tag is defined as <a> tag and closed tag </a> .Here, It is used to give a link to a webpage, image, and redirect to a particular location link.

  <!DOCTYPE html> 
<HTML>  
<head> 
<title> HTML Anchor Tag </title> 
</head> 
<body>  
<a target="_blank" href="https://dailyaspirants.com"> Click Here to Redirect To </a> 
</body>  
</html>
  

Click Here to Redirect To



Read also:  Rowspan and Colspan in HTML

Read also: How to create Multiple tables in one page in HTML

Previous Post Next Post