0% found this document useful (0 votes)
22 views5 pages

Complete HTML Tags Reference Guide

The document provides a comprehensive reference for HTML tags, detailing their definitions, use cases, and examples. It covers essential tags such as <html>, <head>, <body>, <title>, and various list, table, form, and input elements. Each tag is explained in terms of its purpose and how it is used in HTML documents.

Uploaded by

justfryitbro
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views5 pages

Complete HTML Tags Reference Guide

The document provides a comprehensive reference for HTML tags, detailing their definitions, use cases, and examples. It covers essential tags such as <html>, <head>, <body>, <title>, and various list, table, form, and input elements. Each tag is explained in terms of its purpose and how it is used in HTML documents.

Uploaded by

justfryitbro
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Complete HTML Tags Reference

<html>
Definition: Defines the root of an HTML document.
Use Case: Used as the main wrapper for all HTML elements.
Example:
<html>
<head>
<title>My Page</title>
</head>
<body>
<p>Hello World!</p>
</body>
</html>

<head>
Definition: Contains metadata about the document.
Use Case: Used for including CSS, JavaScript, and metadata.
Example:
<head>
<meta charset='UTF-8'>
<title>My Page</title>
</head>

<body>
Definition: Contains the visible page content.
Use Case: Wraps all visible content on the webpage.
Example:
<body>
<h1>Welcome</h1>
<p>Enjoy the page!</p>
</body>

<title>
Definition: Sets the page title in the browser tab.
Use Case: Used inside `<head>` for SEO and user readability.
Example:
<title>My Awesome Page</title>

<h1> to <h6>
Definition: Defines HTML headings.
Use Case: Used for structuring content hierarchically.

Page 1
Complete HTML Tags Reference

Example:
<h1>Main Title</h1>
<h2>Subtitle</h2>
<h3>Section</h3>

<p>
Definition: Defines a paragraph.
Use Case: Used for separating blocks of text.
Example:
<p>This is a paragraph.</p>

<a>
Definition: Defines a hyperlink.
Use Case: Used for navigating between web pages.
Example:
<a href="[Link] Example</a>

<img>
Definition: Embeds an image.
Use Case: Used to display pictures and graphics.
Example:
<img src="[Link]" alt="Example Image">

<ul>
Definition: Defines an unordered list.
Use Case: Used for bullet point lists.
Example:
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>

<ol>
Definition: Defines an ordered list.
Use Case: Used for numbered lists.
Example:
<ol>
<li>First</li>
<li>Second</li>
</ol>

Page 2
Complete HTML Tags Reference

<li>
Definition: Defines a list item.
Use Case: Used inside `<ul>` or `<ol>`.
Example:
<ul>
<li>Item</li>
</ul>

<table>
Definition: Creates a table.
Use Case: Used for displaying tabular data.
Example:
<table>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
</tr>
</table>

<tr>
Definition: Defines a table row.
Use Case: Used within a `<table>` to group `<td>` elements.
Example:
<tr>
<td>Row 1, Cell 1</td>
<td>Row 1, Cell 2</td>
</tr>

<td>
Definition: Defines a table data cell.
Use Case: Used inside `<tr>` to hold table content.
Example:
<td>Table Cell</td>

<th>
Definition: Defines a table header cell.
Use Case: Used to display bolded column headers.
Example:
<th>Header</th>

Page 3
Complete HTML Tags Reference

<form>
Definition: Creates a form for user input.
Use Case: Used to collect user data.
Example:
<form>
<input type='text'>
<button>Submit</button>
</form>

<input>
Definition: Defines an input field.
Use Case: Used to collect text, numbers, etc.
Example:
<input type='text' placeholder='Enter name'>

<button>
Definition: Creates a clickable button.
Use Case: Used for form submission and actions.
Example:
<button>Click Me</button>

<select>
Definition: Defines a dropdown list.
Use Case: Used to provide multiple selection options.
Example:
<select>
<option>Option 1</option>
<option>Option 2</option>
</select>

<option>
Definition: Defines an option in a `<select>`.
Use Case: Used to provide choices in dropdowns.
Example:
<option>Choice</option>

<textarea>
Definition: Creates a multi-line text input.
Use Case: Used for long text input.
Example:

Page 4
Complete HTML Tags Reference

<textarea rows='4' cols='50'>Enter text here...</textarea>

<div>
Definition: Defines a container.
Use Case: Used for grouping content and applying styles.
Example:
<div class='box'>Content</div>

<span>
Definition: Defines an inline container.
Use Case: Used for styling text within a paragraph.
Example:
<p>This is <span style='color:red;'>red</span> text.</p>

<footer>
Definition: Defines the footer of a document.
Use Case: Used for copyright notices and links.
Example:
<footer>
<p>&copy; 2025 My Website</p>
</footer>

<script>
Definition: Embeds JavaScript code.
Use Case: Used for adding interactivity to the webpage.
Example:
<script>
alert('Hello, World!');
</script>

Page 5

You might also like