Chapter 1 of ?
html 8 min read

HTML Mastery — Chapter 15: HTML Plug-ins & YouTube Embeds

Complete HTML Tag Reference

Every HTML tag organized by category — your ultimate cheat sheet and reference guide.

📄 Document Structure
TagCategoryDescriptionSelf-Closing?
<!DOCTYPE html>DocumentDocument type declaration. Must be first line. Switches browsers into standards mode.
<html>RootRoot element. Contains all other HTML. Use lang attribute.No
<head>MetadataContainer for document metadata (not displayed).No
<title>MetadataPage title — browser tab and SEO title tag.No
<body>ContentAll visible page content.No
<meta>MetadataMachine-readable page metadata (charset, viewport, description, OG tags).Yes
<link>MetadataLinks external resources: CSS, favicon, canonical, preload, manifest.Yes
<style>MetadataInline CSS for the page.No
<base>MetadataBase URL for all relative links. Only one per page.Yes
<script>ScriptingInline or external JavaScript. Use defer or async for performance.No
<noscript>ScriptingFallback content when JavaScript is disabled.No
🏗️ Semantic Layout
TagTypeDescriptionSelf-Closing?
<header>SectioningIntroductory content for page or section. Can appear multiple times.No
<nav>SectioningMajor navigation links section.No
<main>SectioningPrimary content of the page. One per page only.No
<article>SectioningSelf-contained content that can be independently syndicated.No
<section>SectioningThematic grouping of content with a heading.No
<aside>SectioningContent tangentially related to main content (sidebar, pull quote).No
<footer>SectioningFooter for page or section — copyright, links, author info.No
<address>SectioningContact information for nearest article or body ancestor.No
<div>Generic BlockGeneric block container — no semantic meaning. Use when nothing else fits.No
<span>Generic InlineGeneric inline container — no semantic meaning.No
<search>SectioningNew Landmark region for search forms.No
📝 Text & Typography
TagDisplayDescriptionSelf-Closing?
<h1>–<h6>BlockSix levels of headings. Use one <h1> per page. Semantic hierarchy for SEO and accessibility.No
<p>BlockA paragraph of text. Browser adds margin above and below.No
<strong>InlineImportant text — bold with semantic weight.No
<em>InlineEmphasized text — italic with semantic weight (stress emphasis).No
<b>InlineBold text — no semantic meaning (stylistic bold).No
<i>InlineItalic text — no semantic weight. For technical terms, foreign words.No
<u>InlineUnderlined text — for annotations (not links).No
<s>InlineStrikethrough — content no longer accurate (not deleted). Used in pricing.No
<del>InlineDeleted content with semantic meaning. Has cite and datetime attributes.No
<ins>InlineInserted content with semantic meaning.No
<mark>InlineHighlighted/marked text (like a yellow marker). Used for search result highlighting.No
<small>InlineFine print, side comments, copyright notices.No
<sub>InlineSubscript (H₂O, chemical formulas).No
<sup>InlineSuperscript (x², footnotes, ordinals).No
<br>InlineLine break. Self-closing. Avoid for spacing — use CSS margin.Yes
<wbr>InlineWord break opportunity — hint to break long URLs/words.Yes
<hr>BlockThematic break (horizontal rule). Self-closing.Yes
<blockquote>BlockBlock-level quotation from external source. Attribute: cite.No
<q>InlineInline quotation. Browser adds quotation marks.No
<pre>BlockPreformatted text — preserves whitespace, tabs, line breaks.No
<code>InlineInline code snippet. Monospace font.No
<kbd>InlineKeyboard input — keys the user should press.No
<samp>InlineSample output from a computer program.No
<var>InlineA variable in math or programming.No
<abbr>InlineAbbreviation or acronym. Use title for full form.No
<dfn>InlineDefining instance of a term.No
<cite>InlineReference to a cited work.No
<time>InlineA date/time. Attribute: datetime for machine-readable format.No
<bdi>InlineBi-directional isolation — for mixed-direction text.No
<bdo>InlineBi-directional override. Attribute: dir="rtl|ltr".No
<ruby>InlineRuby annotation container (East Asian typography annotations).No
<rt>InlineRuby text — the annotation/pronunciation above characters.No
<rp>InlineRuby parenthesis — fallback for browsers that don't support ruby.No
📋 Lists
TagDescriptionKey Attributes
<ul>Unordered list (bullet points).
<ol>Ordered list (numbered).type, start, reversed
<li>List item in <ul> or <ol>.value (in ol only)
<dl>Description list — for term/definition pairs.
<dt>Description term.
<dd>Description details/definition.
<menu>A toolbar or context menu list of commands (mostly for web app UIs).
🔗 Links & Navigation
TagDescriptionKey Attributes
<a>Anchor/hyperlink. The foundation of the web.href, target, rel, download, hreflang, type
🗄️ Tables
TagDescriptionKey Attributes
<table>Table container.
<caption>Table title/description.
<thead>Table header row group.
<tbody>Table body row group.
<tfoot>Table footer row group.
<tr>Table row.
<th>Table header cell. Bold and centered by default.scope, colspan, rowspan, abbr
<td>Table data cell.colspan, rowspan, headers
<colgroup>Groups columns for styling.span
<col>A column in a colgroup. Self-closing.span
📝 Forms
TagDescriptionKey Attributes
<form>Form container. Groups related inputs.action, method, enctype, novalidate, autocomplete
<input>Self-closing input field. Behavior determined by type.type (22 values), name, value, required, disabled, placeholder, pattern, min/max
<textarea>Multi-line text input.rows, cols, wrap, maxlength, placeholder
<select>Dropdown menu.multiple, size, name, required
<option>An item in a select or datalist.value, selected, disabled
<optgroup>Groups options in a select.label, disabled
<button>Clickable button. Can contain HTML.type (submit/button/reset), disabled, form, formaction
<label>Label for a form element. Clicking focuses the input.for (must match input id)
<fieldset>Groups related form controls.disabled, form, name
<legend>Caption for a fieldset.
<datalist>Provides autocomplete suggestions for an input.id (referenced by input list)
<output>Displays a calculated result.for, name, form
<progress>Progress bar.value, max
<meter>Scalar measurement gauge.value, min, max, low, high, optimum
🖼️ Media
TagDescriptionKey Attributes
<img>Embeds an image. Self-closing.src, alt, width/height, loading, srcset, sizes, decoding
<picture>Responsive image container.Contains <source> + <img>
<source>Alternative media source. Self-closing.src, srcset, type, media, sizes
<audio>Embeds audio.src, controls, autoplay, muted, loop, preload
<video>Embeds video.src, controls, autoplay, muted, loop, poster, playsinline, preload
<track>Text track for audio/video (subtitles/captions). Self-closing.kind, src, srclang, label, default
<figure>Self-contained content with optional caption.
<figcaption>Caption for a figure.
<iframe>Embeds external webpage.src, title, allow, sandbox, loading, allowfullscreen
<canvas>JavaScript drawing surface.width, height
<svg>Scalable Vector Graphics container.viewBox, width, height, xmlns
<map>Image map container.name
<area>Clickable area in image map. Self-closing.shape, coords, href, alt
🎛️ Interactive & Scripting
TagDescriptionKey Attributes
<details>Disclosure/accordion widget. No JS needed.open, name (exclusive group)
<summary>Visible toggle label for <details>.
<dialog>Native modal/dialog element.open, JS: .showModal(), .close()
<template>Client-side HTML template. Not rendered until cloned via JS.
<slot>Placeholder in Shadow DOM for Web Components.name
<object>Embeds external content (PDFs, plugins). Mostly legacy.data, type, width/height
<embed>Embeds external application/plugin. Self-closing. Mostly legacy.src, type, width/height
⚠️ Deprecated Tags (Do Not Use)
TagWas Used ForModern Replacement
<font> DeprecatedSet font face, size, colorCSS font-family, font-size, color
<center> DeprecatedCenter-align contentCSS text-align: center or margin: 0 auto
<big> DeprecatedIncrease text sizeCSS font-size
<strike> DeprecatedStrikethrough text<s> or <del>
<tt> DeprecatedTeletype/monospace text<code> or CSS font-family: monospace
<frame>/<frameset> DeprecatedSplit browser window into frames<iframe>
<applet> DeprecatedEmbed Java appletsJavaScript, WebAssembly
<blink> DeprecatedBlinking textCSS animation
<marquee> DeprecatedScrolling textCSS animation
<basefont> DeprecatedSet default font for documentCSS body { font-family: ... }

🎉 HTML Mastery Complete!

You've completed the HTML Mastery tutorial series. Here's what you've learned:

  • Ch 1–2: Document structure, meta tags, and text typography
  • Ch 3–5: Links, lists, and tables with all attributes
  • Ch 6–7: Forms with 22 input types and media (img, audio, video)
  • Ch 8–9: Semantic HTML5 layout and all global attributes
  • Ch 10–11: Scripting, embedded content, and full ARIA accessibility
  • Ch 12–13: SEO best practices and interactive HTML5 elements
  • Ch 14–15: All event attributes and complete tag reference
Done with this chapter?
Mark it complete to track your progress and unlock your certificate.
Next Up

Learner Reviews

Write a Review
Share your experience to help other learners.
Your Rating *