h1 — level-one heading
The h1 element represents a heading for a top-level section. Choose heading levels to match the content structure.
CKTIS / Knowledge base
Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.
The h1 element represents a heading for a top-level section. Choose heading levels to match the content structure.
The h2 element marks a subsection heading, typically below the main h1 heading. It expresses content structure rather than merely changing text appearance.
The h3 element marks a third-level heading, typically naming a subdivision beneath an h2 heading.
The `h4` element marks a fourth-level heading. Choose it according to content hierarchy, not text size.
The h5 element represents a heading with a base level of 5. Use it to label a deeply nested part of a document, not to select a text size.
The h6 element represents a heading with a base level of 6, not simply small text. Use it for deeply nested subsections, following the document's heading hierarchy.
The `head` element groups document metadata, such as the title and character encoding declaration. It is the first element child of `html`, before `body`.
The `header` element groups introductory content or navigational aids for a page or part of it. It can contain a heading, but does not itself create a new section.
The hgroup element combines one h1–h6 heading with related content, such as a subtitle or tagline marked up as p. It is not a container for multiple headings.
The `hr` element marks a paragraph-level thematic break, such as a scene change, rather than merely a decorative line.
The `html` element is the root of an HTML document. It contains `head` followed by `body`; its `lang` attribute identifies the document language.
The `i` element marks text in an alternate voice or quality relative to surrounding prose, rather than merely requesting italics.
The iframe element embeds a separate document. Learn how src differs from srcdoc and how sandbox restricts content.
The img element embeds an image in an HTML document. The src and srcset attributes identify resources, while alt supplies text that replaces the information conveyed by the image.
The `input` element represents a data field or button depending on `type`. Learn how to choose its type, provide a label and submission name, and apply basic value constraints.
The ins element marks content added to a document. Optional datetime and cite attributes record the change date and a URL explaining it.
The `kbd` element represents user input, usually keyboard input but also, for example, voice commands. Nesting can identify individual keys.
The `label` element gives a control a caption. Associate it using `for` and `id`, or place the control inside the label.
The `legend` element captions a group in `fieldset` or labels an option group in `optgroup`. It must be the first element child; it does not replace labels for individual controls.
The `li` element represents an item in an `ol`, `ul`, or `menu` list. Its `value` attribute can change an item's number in an ordered list.
The `link` element describes a relationship between an HTML document and another resource, such as a CSS stylesheet. `rel` identifies the relationship, and `href` usually supplies the address. It does not create a visible clickable link.
The `main` element identifies a document’s dominant content. A document may contain at most one `main` without the `hidden` attribute.
The `map` element works with `img` and descendant `area` elements to create an image map: geometric regions can link to different destinations.
The mark element identifies contextually relevant text, such as a search match or a passage being discussed in a quotation.