HTML Quick Reference Guide
Basic Structure
<!DOCTYPE html>: Defines the document type and version of HTML
<html>: Root element of the HTML document
<head>: Container for metadata (not displayed)
<title>: Sets the title in the browser tab
<body>: Contains the visible page content
Text Formatting
<h1>-<h6>: Headings (h1 is largest, h6 smallest)
<p>: Paragraph
<br>: Line break
<hr>: Horizontal rule (divider)
<b>: Bold text
<strong>: Important (bold) text
<i>: Italic text (visual only)
<cite>: Italic for citing creative work (semantic)
<em>: Emphasized (italic) text
<mark>: Highlighted text
<small>: Smaller text
<del>: Deleted/strikethrough (semantic: removed content)
<s>: Strikethrough (semantic: no longer accurate/relevant)
<ins>: Inserted/underlined text
<sub>: Subscript text
<sup>: Superscript text
Links and Media
<a>: Anchor tag (hyperlink)
<img>: Displays image
<audio>: Embeds audio
<video>: Embeds video
<source>: Specifies media source (for audio/video)
<track>: Specifies text tracks for media (e.g., subtitles)
Lists
<ul>: Unordered list (bullets)
<ol>: Ordered list (numbers)
<li>: List item
<dl>: Description list
<dt>: Term in a description list
<dd>: Description of the term
Tables
<table>: Defines a table
<tr>: Table row
<td>: Table data/cell
<th>: Table header
<thead>: Groups table head content
<tbody>: Groups body content
<tfoot>: Groups footer content
<caption>: Table title
<col>: Defines column properties
<colgroup>: Groups columns for styling
Forms & Inputs
<form>: Creates a form
<input>: Input field
<textarea>: Multi-line text input
<button>: Clickable button
<select>: Dropdown menu
<option>: Option in dropdown
<label>: Label for input
<fieldset>: Groups form elements
<legend>: Caption for <fieldset>
<datalist>: Provides options for <input>
<output>: Displays calculation result
Grouping & Layout
<div>: Division or container
<span>: Inline container
<section>: Thematic grouping
<article>: Independent, self-contained content
<aside>: Sidebar content
<header>: Page or section header
<footer>: Page or section footer
<nav>: Navigation links
<main>: Main content area
Semantic Tags
<figure>: Groups media and caption
<figcaption>: Caption for <figure>
<time>: Represents time/date
<address>: Contact information
<code>: Inline code
<pre>: Preformatted text
<kbd>: Keyboard input
<samp>: Sample output
<var>: Variable name
<cite>: Cites a creative work (e.g., book, article, film)
Meta & Script
<meta>: Metadata (charset, viewport, etc.)
<link>: External resources (e.g., CSS)
<style>: Internal CSS styles
<script>: Embeds or links to JavaScript
<noscript>: Fallback for browsers without JS
Embedded/Interactive
<iframe>: Embeds another page
<embed>: Embeds external content (e.g., PDF)
<object>: Embeds objects (e.g., Flash)
<canvas>: Drawing via JavaScript
<svg>: Vector graphics
Deprecated/Obsolete Tags
<font>: Font styling (now use CSS)
<center>: Centering content
<marquee>: Scrolling text
<u>: Underlined text (use <ins>)