HTML TAGS

🌐 HTML Tags Cheat Sheet

1. Document Structure & Metadata

TagDescription
<!DOCTYPE>Defines the document type
<html>Defines the root of an HTML document
<head>Contains metadata/information for the document
<title>Defines a title for the document
<base>Specifies base URL/target for all relative URLs
<link>Defines the relationship to an external resource (like CSS)
<meta>Defines metadata about the HTML document
<style>Defines style information for a document
<script>Defines a client-side script
<noscript>Alternate content for users without script support
<template>Container for content hidden when page loads

2. Document Layout & Sections

TagDescription
<body>Defines the document’s body
<header>Defines a header for a document or section
<footer>Defines a footer for a document or section
<main>Specifies the main content of a document
<section>Defines a section in a document
<article>Defines an article
<aside>Defines content aside from the main content
<nav>Defines navigation links
<search>Defines a search section
<div>Defines a generic section in a document
<h1><h6>Defines headings
<hgroup>Groups heading and subheadings
<hr>Defines a thematic change in content

3. Text Content & Formatting

TagDescription
<p>Defines a paragraph
<br>Defines a single line break
<pre>Defines preformatted text
<blockquote>Quoted section from another source
<q>Defines a short quotation
<cite>Defines the title of a work
<abbr>Defines an abbreviation
<address>Defines contact information
<b>Bold text
<strong>Important text
<i>Italic or alternate voice
<em>Emphasized text
<mark>Highlighted text
<small>Smaller text
<u>Underlined text
<s>Incorrect or strikethrough text
<del>Deleted text
<ins>Inserted text
<sub>Subscripted text
<sup>Superscripted text
<bdi>Isolates bi-directional text
<bdo>Overrides text direction
<span>Inline container
<dfn>Term being defined
<var>Defines a variable
<samp>Sample output
<kbd>Keyboard input
<code>Code snippet
<time>Defines a specific time/date
<wbr>Possible line-break

4. Multimedia & Graphics

TagDescription
<img>Image
<picture>Container for multiple image sources
<map>Image map
<area>Clickable area in image map
<canvas>Draw graphics via JS
<audio>Sound content
<video>Video content
<source>Multiple media sources
<track>Text tracks for media
<svg>SVG graphics container
<embed>External content container
<object>External object
<param>Parameters for object

5. Lists & Tables

TagDescription
<ul>Unordered list
<ol>Ordered list
<li>List item
<menu>Command list
<dl>Description list
<dt>Term/name
<dd>Description/value
<table>Table
<caption>Table caption
<thead>Table header group
<tbody>Table body group
<tfoot>Table footer group
<tr>Table row
<th>Table header cell
<td>Table cell
<col>Column properties
<colgroup>Group of columns

6. Forms & Input

TagDescription
<form>Form for user input
<label>Label for input
<input>Input control
<textarea>Multiline text input
<button>Clickable button
<select>Dropdown list
<optgroup>Group of related options
<option>Option in dropdown
<datalist>Predefined input options
<fieldset>Group related elements
<legend>Caption for fieldset
<output>Result of calculation
<progress>Progress of a task
<meter>Measurement within a range
<data>Machine-readable value

7. Interactive & Semantic Elements

TagDescription
<details>Expandable details element
<summary>Summary for details
<dialog>Dialog box or popup

8. Deprecated / Not Supported in HTML5

TagReplacement / Notes
<acronym>Use <abbr> instead
<applet>Use <embed> or <object>
<basefont>Use CSS instead
<big>Use CSS instead
<center>Use CSS instead
<dir>Use <ul> instead
<font>Use CSS instead
<frame>Deprecated (no replacement)
<frameset>Deprecated (no replacement)
<noframes>Deprecated (no replacement)
<strike>Use <s> or <del> instead
<tt>Use CSS instead

9. Comments

TagDescription
<!-- ... -->Defines a comment

Comments

Popular posts from this blog

HTML Syntax