HTML TAGS, ATTRIBUTES AND COMPARISONS

Scope: all 113 conforming named HTML elements in the WHATWG element index checked
9 November 2026. SVG <svg> and MathML <math> are foreign-namespace entry elements,
not HTML elements; their full vocabularies are separate standards. Autonomous
custom elements (for example <student-card>) are user-defined and have no finite
complete tag list. Deprecated/historical names are listed separately below.
Reference examples that show a table row/cell/group are fragments requiring the
appropriate parent table. New elements such as selectedcontent need a browser
compatibility check. Element existence does not imply support in every browser.

STRUCTURE
<!DOCTYPE html> is a declaration, not an HTML element. It selects standards mode.
<!-- comment --> is a comment, not an element.
An element consists of start tag, attributes, content and (normally) an end tag.
Void elements have no contents/end tag: area, base, br, col, embed, hr, img,
input, link, meta, source, track and wbr. <img></img> is not a valid paired element.
HTML names are ASCII case-insensitive in text/html, but lowercase is conventional.
JSX is JavaScript: its attribute/component spelling is case-sensitive.

HIGH-VALUE COMPARISONS
head = metadata; header = introductory visible content; heading = h1 to h6.
title = document/tab title; h1 = visible top-level heading.
section = thematic grouping; article = independently meaningful composition;
div = generic flow container; span = generic phrasing container.
strong/em = importance/stress; b/i = attention/alternate voice without those meanings.
br = line break; hr = thematic break; p = paragraph.
ul = unordered list; ol = ordered list; li = item; dl/dt/dd = term descriptions.
a href = navigation link; link rel/href = external resource metadata.
src = embedded resource URL; href = linked resource/destination URL.
table > thead/tbody/tfoot > tr > th/td; colspan spans columns, rowspan spans rows.
th describes a header; td holds data; caption labels the table.
form method = HTTP submission mode; action = destination; input name = data key;
input id = document identifier; label for = the matching input id.
required = a value must be supplied; placeholder = a hint, not a label/value.
readonly controls generally submit their value; disabled controls do not.
checkbox = independently selectable; same-name radios = one choice in a group.
select restricts to options; input+datalist suggests values but allows other input.
GET puts successful form fields into a query string; POST sends a request body.
Neither POST nor password input encrypts traffic; HTTPS provides transport security.
progress = task completion; meter = measured value within a range.
s = no longer accurate; del/ins = editorial deletions/insertions.
script defer = classic external script after parsing, preserving document order;
async = execute when fetched, without preserving that order. Module scripts defer
by default (different async/module rules apply). Inline classic scripts ignore defer.

COMMON ATTRIBUTES (attributes are not tags)
lang: document/content language. charset: encoding declaration on meta.
name="viewport", content="width=device-width, initial-scale=1": mobile viewport.
id: unique document identifier; class: reusable CSS class tokens.
style: inline CSS; title: advisory text, not an accessible-label replacement.
hidden: hides content; inert: makes a subtree noninteractive.
dir="ltr|rtl|auto": direction. tabindex: focus behaviour (avoid positive ordering).
data-*: custom data; aria-*: accessibility semantics where native HTML is insufficient.
href: link URL; target="_blank": new browsing context; rel="noopener": opener isolation.
alt: image alternative; decorative images normally use alt="".
src/srcset/sizes: image source and responsive candidates/sizing.
width/height: intrinsic dimensions; loading="lazy": deferred loading hint.
type: input/button/script/media type depending on element.
value: submitted value; checked: default checkbox/radio checked state.
selected: default option choice; multiple: multiple file/select values.
required, minlength, maxlength, pattern, min, max, step: validation constraints.
accept: suggested allowed file types (still validate uploads on the server).
autocomplete: autofill hint; autofocus: initial focus request (use carefully).
method/action/enctype: form method, URL and encoding; file upload needs
method="post" enctype="multipart/form-data" and input type="file".
for: label-control link (or output dependencies); list: datalist identifier.
rows/cols: textarea size; rows is not rowspan and cols is not colspan.
colspan/rowspan: table cell extent; scope="row|col": table header association.
controls/autoplay/loop/muted/preload: media behaviour; autoplay is policy-dependent.
sandbox/allow: iframe restrictions/features; datetime: machine-readable time.
open: initial details/dialog open state; popover: popover behaviour on elements.
HTML boolean attributes are true by presence: required="false" still means required.
Escaping: &lt; for <, &gt; for >, &amp; for &, &quot; for double quotes in attributes.

INPUT TYPES (all standard states)
hidden: hidden submitted data (not a security boundary)
text: ordinary single-line text; search: search string; tel: telephone text
url: URL; email: email-address input; password: obscured characters
number: numeric entry; range: slider; color: colour picker
checkbox: independent Boolean choice; radio: exclusive same-name choice
file: file chooser; date: calendar date; month: year/month; week: year/week
time: time of day; datetime-local: local date/time without a time-zone identifier
submit: submit button; reset: reset to defaults; button: script-controlled button
image: image submit button, which submits click coordinates

OBSOLETE/HISTORICAL NAMES (recognize old questions; avoid in new documents)
acronym -> abbr; applet -> modern web APIs/embedded alternatives;
basefont, font, center, big, tt -> semantic markup plus CSS;
dir -> ul; strike -> s or del; frameset/frame/noframes -> modern layouts/iframe;
isindex, keygen -> modern form controls/APIs; listing/xmp/plaintext -> pre/code
with escaped markup; marquee/blink -> accessible CSS/JS only if truly needed;
menuitem -> modern controls; noembed -> suitable fallback markup;
param -> obsolete object parameter mechanism; rb/rtc -> historical ruby structures;
content/shadow -> old Shadow DOM, replaced by current slot/template approaches;
bgsound, nobr, spacer, multicol -> nonstandard legacy markup; use modern HTML/CSS.
This legacy recognition list is not an assertion that every vendor's historical
experimental tag is part of HTML. For a particular old tag, check its standard.

Sources: https://html.spec.whatwg.org/multipage/indices.html#elements-3
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements
