30 HTML Tags with Examples
Index
[Link] Tag Name
1 <html>
2 <head>
3 <title>
4 <meta>
5 <link>
6 <style>
7 <script>
8 <body>
9 <h1 to h6>
10 <p>
11 <a>
12 <img>
13 <ul>
14 <ol>
15 <li>
16 <table>
17 <tr>
18 <th>
19 <td>
20 <form>
21 <input>
22 <label>
23 <button>
24 <textarea>
25 <select>
26 <option>
27 <div>
28 <span>
29 <br>
30 <hr>
<html> – HTML Root
Wraps the entire HTML content.
<!DOCTYPE html>
<html>
...
</html>
<head> – Metadata Container
Holds metadata like title and links.
<head>
<title>My Page</title>
</head>
<title> – Page Title
Displays title in browser tab.
<title>My Website</title>
<meta> – Meta Information
Defines metadata like charset or viewport.
<meta charset="UTF-8">
<link> – External Resources
Links external CSS files.
<link rel="stylesheet" href="[Link]">
<style> – Internal CSS
Defines internal CSS styles.
<style>
body {color: blue;}
</style>
<script> – JavaScript Code
Embeds or links JS.
<script>
alert('Hi');
</script>
<body> – Page Content
Contains visible HTML content.
<body>
<h1>Hello</h1>
</body>
<h1> to <h6> – Headings
Defines headings, h1 is largest.
<h1>Main</h1>
<h6>Smallest</h6>
<p> – Paragraph
Represents a paragraph.
<p>This is a paragraph.</p>
<a> – Hyperlink
Creates a hyperlink.
<a href="[Link]
<img> – Image
Embeds an image.
<img src="[Link]" alt="Picture">
<ul> – Unordered List
Bulleted list.
<ul>
<li>Item</li>
</ul>
<ol> – Ordered List
Numbered list.
<ol>
<li>First</li>
</ol>
<li> – List Item
Defines list item.
<li>Item</li>
<table> – Table
Creates a table.
<table border='1'>
...
</table>
<tr> – Table Row
Defines a table row.
<tr>
<td>Cell</td>
</tr>
<th> – Table Header
Defines header cell.
<th>Name</th>
<td> – Table Data
Defines data cell.
<td>John</td>
<form> – Form
Creates a form.
<form action='/submit'>...</form>
<input> – Input Field
Creates an input box.
<input type="text" name="user">
<label> – Label
Label for form input.
<label for="user">Name:</label>
<button> – Button
Clickable button.
<button>Click Me</button>
<textarea> – Multi-line Text
Input for longer text.
<textarea></textarea>
<select> – Dropdown
Creates a dropdown list.
<select><option>One</option></select>
<option> – Dropdown Option
Options inside a select.
<option value='1'>One</option>
<div> – Block Container
Container for block elements.
<div>Block Content</div>
<span> – Inline Container
Container for inline content.
<span>Inline</span>
<br> – Line Break
Inserts a new line.
Line 1<br>Line 2
<hr> – Horizontal Rule
Inserts horizontal line.
<hr>