SyntaxStudy
Sign Up
Home HTML Reference

HTML Reference

66 entries — click any item for full details and examples

Document Structure

Name Description
<!DOCTYPE html> HTML5 Declares the document type and HTML version. Must be the very first line in every HTML document.
<html> The root element of an HTML page. All other elements are descendants of this element.
<head> Contains machine-readable metadata about the document such as title, scripts, and stylesheets.
<body> Represents the content of an HTML document. There can be only one <body> element in a document.
<div> Generic block-level container with no semantic meaning. Used for grouping and styling content.
<span> Generic inline container with no semantic meaning. Used for styling or scripting a part of text.

Text Content

Name Description
<h1> - <h6> Six levels of section headings. <h1> is the highest (most important) and <h6> is the lowest.
<p> Represents a paragraph of text. Browsers automatically add some space before and after each element.
<strong> Indicates strong importance, seriousness, or urgency. Browsers typically render this in bold.
<em> Marks text that has stress emphasis. Browsers typically render this in italic.
<br> Produces a line break in text. Useful in poems or addresses where line divisions are meaningful.
<hr> Represents a thematic break between paragraph-level elements. Rendered as a horizontal rule.
<pre> Represents preformatted text. Whitespace inside is displayed as written, using a monospace font.
<code> Displays its content in a monospace font, indicating a short fragment of computer code.
<blockquote> Indicates that the enclosed text is an extended quotation from another source.
<abbr> Represents an abbreviation or acronym. The optional title attribute provides the full expansion.
<mark> HTML5 Represents text marked or highlighted for reference purposes, like a highlighter pen.
<small> Represents side-comments and small print, like copyright and legal text.
<sub> & <sup> <sub> renders text as subscript; <sup> renders text as superscript. Used in math and chemistry.
<del> & <ins> <del> represents deleted text (strikethrough); <ins> represents inserted text (underline).
<time> HTML5 Represents a specific time or date. The datetime attribute encodes the value in a machine-readable format.

Links

Name Description
<a> Creates a hyperlink to web pages, files, email addresses, or any other URL.

Lists

Name Description
<ul> Represents an unordered list of items, typically rendered with bullet points.
<ol> Represents an ordered list of items, typically rendered with numbers or letters.
<li> Represents an item in a list. Must be a child of <ul>, <ol>, or <menu>.
<dl> Represents a description list. Used for glossaries, metadata, or key-value pairs.

Tables

Name Description
<table> Represents tabular data — information presented in a two-dimensional table with rows and columns.
<thead> / <tbody> / <tfoot> Semantic groups for table rows: header, body, and footer sections.
<tr> Defines a row of cells in a table.
<th> Defines a header cell in a table. Bold and centered by default. Use scope for accessibility.
<td> Defines a data cell in a table. Supports colspan and rowspan for spanning multiple cells.

Forms

Name Description
<form> Represents a document section containing interactive controls for submitting information.
<input> Creates interactive controls in forms. Behavior changes drastically based on the type attribute.
<textarea> A multi-line text input control. Rows and cols set the visible dimensions.
<select> Represents a control providing a menu of options.
<button> Represents a clickable button. Can contain HTML unlike <input type="button">.
<label> Represents a caption for an item in the user interface. Clicking a label focuses its associated input.
<fieldset> Groups related elements within a form. The <legend> element provides a caption for the group.
<datalist> HTML5 Provides a list of predefined options for an <input> element as an autocomplete dropdown.

Media & Embeds

Name Description
<img> Embeds an image into the page. The alt attribute is required for accessibility.
<video> HTML5 Embeds a media player for video playback. Supports multiple source formats.
<audio> HTML5 Embeds sound content in documents. Supports multiple source formats.
<iframe> Embeds another HTML page within the current page. Commonly used for maps, videos, and external content.
<canvas> HTML5 A container for graphics drawn via JavaScript. Used for games, charts, image manipulation.
<figure> & <figcaption> HTML5 <figure> wraps self-contained content like images or diagrams; <figcaption> provides a caption.
<picture> HTML5 Provides multiple image sources for different screen sizes or formats (e.g., WebP with JPEG fallback).

Semantic HTML5

Name Description
<header> HTML5 Represents introductory content or a group of navigational aids. Can be used multiple times per page.
<nav> HTML5 Represents a section of a page whose purpose is to provide navigation links.
<main> HTML5 Represents the dominant content of the <body>. There must be only one <main> per page.
<article> HTML5 Represents self-contained content that could stand alone, such as a blog post or news article.
<section> HTML5 Represents a standalone section of content. Should typically have a heading.
<aside> HTML5 Represents content tangentially related to the main content, such as a sidebar.
<footer> HTML5 Represents a footer for its nearest ancestor, containing information like author, copyright, or links.
<details> & <summary> HTML5 Creates a native accordion/disclosure widget. <summary> is the visible heading; content expands on click.
<dialog> HTML5 Represents a dialog box or modal window. Can be opened with the open attribute or showModal() method.

Metadata & Head

Name Description
<meta> Represents metadata that cannot be represented by other elements. Used for charset, viewport, SEO, and more.
<title> Defines the document title shown in browser tabs, bookmarks, and search engine results.
<link> Specifies relationships between the current document and an external resource. Most used for CSS.
<style> Contains CSS style rules that apply to the document. Usually placed in <head>.
<base> Specifies the base URL and/or target for all relative URLs in a document.

Scripting

Name Description
<script> Embeds or references JavaScript code. Use defer or async to control loading behavior.
<noscript> Defines alternate content to be displayed when a browser does not support JavaScript.
<template> HTML5 Holds client-side content not rendered at load time, but instantiated via JavaScript.
data-* attributes HTML5 Custom data attributes that store extra information on HTML elements. Accessible via JS dataset property.
<progress> HTML5 Displays an indicator showing the completion progress of a task.
<meter> HTML5 Represents a scalar measurement within a known range, like disk usage or a rating.