HTML Tags

HTML Tags


  • HTML tags are like keywords which defines that how web browser will format and display the content.
  • All HTML tags must enclosed within <> these brackets.
  • Every tag in HTML perform different tasks.
  • If you have used an open tag , then you must use a close tag (except some tags).

HTML Tags Example:

<p> Paragraph Tag </p>

<h2> Heading Tag </h2>

<b> Bold Tag </b>

<i> Italic Tag </i>

<u> Underline Tag</u>

Common HTML Tags:



There are many HTML tags available for use in web pages. Here are some of the most common HTML tags and their uses:

  • "<html>": This tag defines the beginning of an HTML document. It must be the first tag in the document, and it must be closed with a </html> tag.
  • "<head>": This tag defines the metadata for an HTML document. It must be the first tag in the document, and it must be closed with a </head> tag.
  • "<title>": This tag defines the title of an HTML document. It must be the first tag in the document, and it must be closed with a </title> tag.
  • "<body>": This tag defines the content of an HTML document. It must be the first tag in the document, and it must be closed with a </body> tag.
  • "<h1>": This tag defines a large heading. It must be closed with a </h1> tag.
  • "<p>": This tag defines a paragraph of text. It must be closed with a </p> tag.
  • "<img>": This tag defines an image. It must be closed with a </img> tag.
  • "<a>": This tag defines a hyperlink. It must be closed with a </a> tag.
  • "<div>": This tag defines a division or section in an HTML document. It must be closed with a </div> tag.
  • "<span>": This tag defines a section in an HTML document. It must be closed with a </span> tag.
  • "<table>": This tag defines a table. It must be closed with a </table> tag.
  • "<tr>": This tag defines a table row. It must be closed with a </tr> tag.
  • "<td>": This tag defines a table cell. It must be closed with a </td> tag.
  • "<form>": This tag defines an HTML form. It must be closed with a </form> tag.
  • "<input>": This tag defines an input control. It must be closed with a </input> tag.
  • "<button>": This tag defines a clickable button. It must be closed with a </button> tag.
  • "<select>": This tag defines a drop-down list. It must be closed with a </select> tag.
  • "<option>": This tag defines an option in a drop-down list. It must be closed with a </option> tag.
  • "<textarea>": This tag defines a multi-line text input control. It must be closed with a </textarea> tag.
  • "<ul>": This tag defines an unordered list. It must be closed with a </ul> tag.
  • "<ol>": This tag defines an ordered list. It must be closed with a </ol> tag.
  • "<li>": This tag defines a list item. It must be closed with a </li> tag.
  • "<dl>": This tag defines a description list. It must be closed with a </dl> tag.
  • "<dt>": This tag defines a term/name in a description list. It must be closed with a </dt> tag.


  • 4. HTML Attributes

    HTML attributes provide additional information about HTML elements. Attributes are always specified in the start tag. Attributes usually come in name/value pairs like: name="value".

  • "<a href="http://www.example.com">": Example Website </a>
  • "<img src="example.jpg" alt="Example Image">": Specifies the location of the image file and provides alternative text for users who cannot see the image
  • "<table border="1">": Specifies the border width of the table


  • 5. HTML Headings

    HTML headings are defined with the <h1> to <h6> tags.

  • "<h1>": This tag defines the most important heading. It should be used for main headings, followed by <h2> for subheadings. <h1> is the largest heading, <h6> is the smallest.
  • "<h2>": This tag defines a subheading.
  • "<h3>": This tag defines a subheading.
  • "<h4>": This tag defines a subheading.
  • "<h5>": This tag defines a subheading.
  • "<h6>": This tag defines a subheading.


  • 6. Conclusion

    HTML is the standard markup language for creating Web pages. HTML describes the structure of a Web page. HTML consists of a series of elements. HTML elements tell the browser how to display the content. HTML elements label pieces of content such as "this is a heading", "this is a paragraph", "this is a link", etc.