Detailed HTML Tags Reference
<!DOCTYPE html>
Declares the document type and version of HTML being used. Required at the top of every HTML5 document to ensure
proper rendering and behavior in web browsers.
Example:
<!DOCTYPE html>
<html>
The root element of an HTML document. All other elements must be descendants of this element.
Attributes: lang (specifies language)
Example:
<html lang="en">...</html>
<head>
Contains meta-information about the document like title, links, scripts, and styles.
Example:
<head><title>Page Title</title></head>
<title>
Sets the title of the web page displayed in the browser's title bar or tab.
Example:
<title>My Website</title>
<meta>
Provides metadata such as character encoding, author, and viewport settings.
Example:
<meta charset="UTF-8">
<link>
Used to link external resources like CSS files.
Attributes: rel, href
Detailed HTML Tags Reference
Example:
<link rel="stylesheet" href="[Link]">
<style>
Embeds internal CSS styles within the document.
Example:
<style>body { background-color: lightblue; }</style>
<script>
Embeds or references JavaScript code for dynamic behavior.
Example:
<script>alert('Hello!');</script>
<body>
Contains all the content that will be displayed on the page.
Example:
<body><h1>Welcome</h1></body>
<h1> to <h6>
Define HTML headings. <h1> is the most important, <h6> the least.
Example:
<h1>Main Title</h1><h2>Subtitle</h2>
<p>
Defines a paragraph.
Example:
<p>This is a paragraph.</p>
<br>
Inserts a line break. It?s a self-closing tag.
Detailed HTML Tags Reference
Example:
Line 1<br>Line 2
<hr>
Creates a horizontal rule (line). It?s used to separate content.
Example:
<hr>
<a>
Defines a hyperlink.
Attributes: href (target URL), target
Example:
<a href="[Link]
<img>
Embeds an image.
Attributes: src (image URL), alt (description)
Example:
<img src="[Link]" alt="Image">
<ul>
Defines an unordered list (bullets).
Example:
<ul><li>Item 1</li></ul>
<ol>
Defines an ordered list (numbers).
Example:
<ol><li>First</li></ol>
Detailed HTML Tags Reference
<li>
List item in <ul> or <ol>.
Example:
<li>Item</li>
<div>
Block-level container used for grouping and styling.
Example:
<div class="container">Content</div>
<span>
Inline container used for styling a part of text.
Example:
<span style="color:red;">Red</span>
<table>
Creates a table.
Example:
<table><tr><td>Cell</td></tr></table>
<tr>
Defines a row in a table.
Example:
<tr><td>Row</td></tr>
<td>
Defines a cell in a table.
Example:
<td>Data</td>
Detailed HTML Tags Reference
<th>
Defines a header cell in a table.
Example:
<th>Header</th>
<form>
Defines a form for user input.
Example:
<form action="/submit">...</form>
<input>
Defines an input field.
Types: text, checkbox, radio, etc.
Example:
<input type="text">
<textarea>
Multi-line text input.
Example:
<textarea rows="4" cols="50"></textarea>
<button>
Defines a clickable button.
Example:
<button>Click Me</button>
<label>
Defines a label for an <input> element.
Example:
<label for="name">Name</label>
Detailed HTML Tags Reference
<select>
Defines a dropdown list.
Example:
<select><option>One</option></select>
<option>
Defines an option in a dropdown.
Example:
<option value="1">Option 1</option>
<iframe>
Embeds another HTML page.
Example:
<iframe src="[Link]"></iframe>
<nav>
Defines a section with navigation links.
Example:
<nav><a href="/">Home</a></nav>
<header>
Defines a header for a page or section.
Example:
<header>Welcome</header>
<footer>
Defines the footer of a page.
Example:
<footer>© 2025</footer>
Detailed HTML Tags Reference
<section>
Groups related content together.
Example:
<section><h2>News</h2></section>
<article>
Defines independent self-contained content.
Example:
<article><h2>Post</h2></article>
<aside>
Defines side content like ads.
Example:
<aside>Tip: Save often.</aside>
<main>
Defines the main content of a page.
Only one <main> per page.
Example:
<main>Main content here</main>
<em>
Emphasizes text (usually italic).
Example:
<em>Important</em>
<strong>
Strong importance (usually bold).
Example:
<strong>Warning!</strong>
Detailed HTML Tags Reference
<mark>
Highlights text.
Example:
<mark>Note</mark>
<code>
Formats inline code.
Example:
<code>[Link]()</code>
<pre>
Preserves whitespace and line breaks.
Example:
<pre> code block</pre>
<blockquote>
Indicates extended quotation.
Example:
<blockquote>Quote</blockquote>
<abbr>
Defines an abbreviation.
Example:
<abbr title="Hypertext Markup Language">HTML</abbr>
<cite>
Cites a creative work.
Example:
<cite>Book Title</cite>
Detailed HTML Tags Reference
<time>
Represents time or date.
Example:
<time datetime="2025-04-25">April 25, 2025</time>
<audio>
Embeds audio content.
Example:
<audio controls src="song.mp3"></audio>
<video>
Embeds video content.
Example:
<video controls src="video.mp4"></video>