Important HTML Tags with Explanations
and Examples
🔹 Basic Structure Tags
Tag Description Example
<!DOCTYPE html> Declares the document type <!DOCTYPE html>
and HTML version.
<html> Root element of an HTML <html>...</html>
page.
<head> Contains meta information <head>...</head>
about the document.
<title> Sets the title of the webpage <title>My Website</title>
(shown in browser tab).
<body> Contains the content <body>...</body>
displayed on the webpage.
🔹 Text Formatting Tags
Tag Description Example
<h1> to <h6> Headings from largest (h1) <h1>Main Title</h1>
to smallest (h6).
<p> Paragraph. <p>This is a
paragraph.</p>
<b> / <strong> Bold text / Important text. <b>Bold</b> or
<strong>Strong</strong>
<i> / <em> Italic text / Emphasized <i>Italic</i> or
text. <em>Emphasized</em>
<br> Line break. Line1<br>Line2
<hr> Horizontal rule (line). <hr>
🔹 Links and Images
Tag Description Example
<a> Anchor tag for hyperlinks. <a
href="[Link]
">Visit</a>
<img> Embeds an image. <img src="[Link]"
alt="My Image">
🔹 Lists
Tag Description Example
<ul> Unordered list. <ul><li>Item</li></ul>
<ol> Ordered list. <ol><li>First</li></ol>
<li> List item. <li>Item</li>
🔹 Tables
Tag Description Example
<table> Creates a table. <table>...</table>
<tr> Table row. <tr>...</tr>
<td> Table data cell. <td>Cell</td>
<th> Table header cell. <th>Header</th>
<thead> / <tbody> / <tfoot> Table sections. <thead><tr>...</tr></
thead>
🔹 Forms
Tag Description Example
<form> Defines a form. <form
action="/submit">...</form
>
<input> Input field. <input type="text">
<label> Label for an input. <label
for="name">Name:</label>
<textarea> Multi-line text input. <textarea></textarea>
<button> Clickable button. <button>Click Me</button>
<select> and <option> Dropdown list. <select><option>One</
option></select>
🔹 Media Tags
Tag Description Example
<video> Embeds video. <video controls><source
src="video.mp4"></video>
<audio> Embeds audio. <audio controls><source
src="audio.mp3"></audio>
🔹 Semantic Tags (HTML5)
Tag Description Example
<header> Defines a header for a page <header>...</header>
or section.
<footer> Footer section. <footer>...</footer>
<nav> Navigation links. <nav>...</nav>
<article> Independent content. <article>Blog
post</article>
<section> A section in the document. <section>...</section>
<aside> Sidebar or additional <aside>Note</aside>
content.
<main> Main content area. <main>...</main>
🔹 Meta and Script Tags
Tag Description Example
<meta> Metadata about the <meta charset="UTF-8">
document.
<link> Link external resources like <link rel="stylesheet"
CSS. href="[Link]">
<style> Internal CSS. <style>body
{color:red;}</style>
<script> JavaScript code. <script> alert("Hi")
</script>