ToolHop.

ADVERT

๐Ÿงฑ HTML Cheatsheet

Semantic HTML reference covering document structure, text elements, media, forms, and SEO-ready metadata.

Semantic HTML patterns, forms, and metadata reminders you can scan in seconds. Improve accessibility, SEO, and rendering performance with clean markup.

Document Structure

Scaffold every page with semantic layout elements.

TagPurposeNotes
<!DOCTYPE html>HTML5 doctypeAlways start your documents with the modern doctype.
<html lang="en">Root elementSet lang for accessibility and SEO.
<head>Metadata containerIncludes title, meta tags, links, and preload hints.
<body>Visible document contentAll interactive markup lives here.
<main>Primary page contentUse once per page for better screen reader navigation.
<header>Introductory contentGreat for navbars or hero sections.

Text & Semantics

Typography-friendly components for readable documents.

Headings

Use &lt;h1&gt;โ€“&lt;h6&gt; to create a logical outline.

<h2>Section title</h2>

Paragraphs

Wrap prose with &lt;p&gt; and use &lt;br&gt; sparingly.

<p>Readable copy lives here.</p>

Strong & Emphasis

Use &lt;strong&gt; for importance and &lt;em&gt; for stress.

<strong>Key idea</strong>

Lists

Combine &lt;ul&gt;/&lt;ol&gt; with &lt;li&gt; for structured lists.

<ul>
  <li>Item</li>
</ul>

Code & Pre

Use &lt;code&gt; inline and &lt;pre&gt;&lt;code&gt; for blocks.

<pre><code>npm run dev</code></pre>

Quotes

Wrap long quotations with &lt;blockquote&gt; and cite sources.

<blockquote>Wisdom</blockquote>

Media & Embeds

Serve performant, accessible visuals and embeds.

TagPurposeNotes
<img src="" alt="" loading="lazy">ImagesAlways include descriptive alt text.
<picture>Responsive imagesProvide multiple sources for different viewports.
<video controls>Inline videoAdd poster, tracks, and muted autoplay when needed.
<audio controls>Audio playbackUse preload="none" to defer downloads.
<iframe loading="lazy">Embedded contentSet title attributes for accessibility.

Forms

Compose accessible data capture experiences.

TagPurposeNotes
<form action="" method="post">Form wrapperUse GET for search and POST for mutations.
<label for="email">Accessible labelAlways associate labels with inputs.
<input type="email" required>InputHTML validation handles common formats.
<textarea rows="4">Multiline inputUse aria-describedby for helper text.
<button type="submit">Submission controlPrefer button over input for richer content.

Metadata & SEO

High-impact tags that search engines and social cards respect.

  • SEO title

    &lt;title&gt;Unique page titles under 60 characters.&lt;/title&gt;

  • Meta description

    &lt;meta name="description" content="150-160 character summary" /&gt;

  • Open Graph

    &lt;meta property="og:title" content="Sharable title" /&gt;

  • Favicon

    &lt;link rel="icon" href="/favicon.ico" sizes="32x32" /&gt;

  • Preload

    &lt;link rel="preload" href="font.woff2" as="font" type="font/woff2" crossorigin /&gt;

ADVERT

ADVERT

HTML Cheatsheet - Semantic Tags, Forms & Metadata