HTML_30_Tags_with_Examples
HTML_30_Tags_with_Examples
Index
S.No 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>
<!DOCTYPE html>
<html>
...
</html>
<head> – Metadata Container
Holds metadata like title and links.
<head>
<title>My Page</title>
</head>
<title>My Website</title>
<meta charset="UTF-8">
<style>
body {color: blue;}
</style>
<script>
alert('Hi');
</script>
<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="https://example.com">Visit</a>
<img> – Image
Embeds an image.
<ul>
<li>Item</li>
</ul>
<ol>
<li>First</li>
</ol>
<li>Item</li>
<table> – Table
Creates a table.
<table border='1'>
...
</table>
<tr>
<td>Cell</td>
</tr>
<th>Name</th>
<td>John</td>
<form> – Form
Creates a form.
<form action='/submit'>...</form>
<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 value='1'>One</option>
<div>Block Content</div>
<span>Inline</span>
Line 1<br>Line 2
<hr>