DEV Community

Cover image for What are the tags in HTML?
Kuganesh S
Kuganesh S

Posted on

What are the tags in HTML?

There are many tags in HTML,they are known as

  • Document structure tags
  • Content and text formatting tags
  • Form tags
  • Table tags
  • Media tags

Document structure tags

<!DOCTYPE html>-It declares the version & document type of HTML.
<html>-It consists of all other HTML elements.
<head>-It contains title,character set & CSS links.Also it not visible in HTML webpage.
<title>-Used to declare title of the HTML webpage.
<body>-It contains content of the HTML webpage like text,images,links and so on.

Content and text formatting tags

<h1>to<h6>-Heading levels used for webpage from high to low.
<p>-It helps to write paragraph content inside the HTML webpage.
<a>-Anchor tag creates hyperlink to another webpage.
<img>-Adding images to webpage.
<ul>-Creates unorder list in the HTML document.
<ol>-Creates order list in the HTML document.
<li>-Uses within the unorder & order list.
<strong>-To bold the text.
<em>-Text to convert italic.
<div>-It is block level container & divison or section in HTML webpage.
<span>-For styling & scripting purposes.
<br>-For break the line.
<hr>-For horizontal line.

Form tags

<form>-It defines user input in HTML.
<input>-Various types of inputs are created like text,password,email,button and son on.
<select>-Dropdown list is created.(ex:<select id="bikes">)
<option>-Create a options within the <select>.
<button>-Create a click button.

Table tags

<table>-It defines the HTML table.
<tr>-It defines the table row element.
<th>-It defines the table header element.
<td>-It defines the table data inside the HTML table.Some other attributes are(<thead>,<tbody>,<tfoot>).

Media tags

<audio>-It defines a sound content like music or spoken audio.

Top comments (0)