Here‘s a comprehensive table of commonly used HTML tags, including their start tag, end tag, requirement of a closing tag, and a short explanation
Start Tag | Required | End Tag | Required | Explanation |
---|---|---|---|---|
<html> | Yes | </html> | Yes | Defines the root of an HTML document |
<head> | Yes | </head> | Yes | Contains metadata about the HTML document |
<title> | Yes | </title> | Yes | Defines the title of the document |
<body> | Yes | </body> | Yes | Contains the visible content of the document |
<h1> - <h6> | Yes | </h1> - </h6> | Yes | Defines headings of different levels |
<p> | Yes | </p> | Yes | Defines a paragraph of text |
<a> | Yes | </a> | Yes | Creates a hyperlink to another web page or resource |
<img> | Yes | </img> | Yes | Embeds an image in the document |
<div> | Yes | </div> | Yes | Defines a division or section in an HTML document |
<span> | Yes | </span> | Yes | Defines a container for inline elements |
<ul> | Yes | </ul> | Yes | Creates an unordered list |
<ol> | Yes | </ol> | Yes | Creates an ordered list |
<li> | Yes | </li> | Yes | Defines a list item |
<table> | Yes | </table> | Yes | Creates a table structure |
<tr> | Yes | </tr> | Yes | Defines a row in a table |
<td> | Yes | </td> | Yes | Defines a cell in a table |
<form> | Yes | </form> | Yes | Creates a form for user input |
<input> | Yes | </input> | Yes | Creates an input control within a form |
<button> | Yes | </button> | Yes | Creates a clickable button |
<header> | Yes | </header> | Yes | Represents the header of a document or section |
<nav> | Yes | </nav> | Yes | Defines a navigation section |
<aside> | Yes | </aside> | Yes | Represents content that is tangentially related to the main content |
<section> | Yes | </section> | Yes | Defines a section within a document |
<footer> | Yes | </footer> | Yes | Represents the footer of a document or section |
<blockquote> | Yes | </blockquote> | Yes | Indicates a block of quoted text |
<strong> | Yes | </strong> | Yes | Represents important or emphasized text |
<em> | Yes | </em> | Yes | Represents emphasized text |
<code> | Yes | </code> | Yes | Represents a fragment of computer code |
<pre> | Yes | </pre> | Yes | Preserves whitespace and line breaks in preformatted text |
<hr> | Yes | </hr> | Yes | Inserts a horizontal rule |
<pre> | Yes | </pre> | Yes | Inserts a line break |