HTML Reference
Every HTML element, attribute and code table in one place. Concise, accurate pages with live examples, attribute tables and technical details.
Document and Metadata
-
<base>Sets the base URL and default link target for the whole document. -
<body>Holds all the visible content of an HTML document. -
<head>Contains the metadata of a document, such as its title, styles and scripts. -
<html>The root element that wraps the whole HTML document. -
<link>Connects the document to external resources such as style sheets and icons. -
<meta>Supplies metadata that other head elements can't express, such as charset and viewport. -
<style>Embeds CSS style rules directly in the document. -
<title>Sets the document title shown in browser tabs, bookmarks and search results.
Sections
-
<address>Contact information for the nearest article or for the whole page. -
<article>A self-contained piece of content that makes sense on its own. -
<aside>Content only indirectly related to what surrounds it, such as a sidebar. -
<footer>Closing information for its section or the whole page, such as author or copyright. -
<h1>–<h6>Six levels of section headings, from the most important (h1) to the least (h6). -
<header>Introductory content for its section or the page, such as a logo, title or navigation. -
<hgroup>Groups a heading with related paragraphs such as a subtitle or tagline. -
<main>The dominant, unique content of the page, excluding repeated site parts. -
<nav>A section of major navigation links, such as a menu or table of contents. -
<search>Wraps the controls used to search or filter, creating a search landmark. -
<section>A thematic grouping of content, usually introduced by a heading.
Text Content
-
<blockquote>A longer passage quoted from another source, shown as its own block. -
<dd>The description or value for the preceding term(s) in a description list. -
<div>A generic block-level container with no meaning of its own. -
<dl>A description list of name–value groups, built from <dt> and <dd>. -
<dt>The term or name part of a group in a description list. -
<figcaption>The caption or legend for the content of its parent <figure>. -
<figure>Self-contained content, such as an image or code listing, with an optional caption. -
<hr>A thematic break, such as a change of scene or topic, between blocks. -
<li>One item in an ordered, unordered or menu list. -
<menu>An unordered list of commands, such as the buttons of a toolbar. -
<ol>A list of items where the order matters, numbered by default. -
<p>A paragraph of text or other phrasing content. -
<pre>Preformatted text whose spaces and line breaks are shown exactly as written. -
<ul>A list of items where the order doesn't matter, bulleted by default.
Inline Text
-
<a>Creates a hyperlink to another page, a file, a place in the page or an email address. -
<abbr>Marks an abbreviation or acronym, optionally with its full expansion. -
<b>Draws attention to text without giving it extra importance. -
<bdi>Isolates text whose direction is unknown, such as user-supplied names. -
<bdo>Forces the characters inside it to be displayed in a given direction. -
<br>Inserts a line break where the break is part of the content. -
<cite>Marks the title of a creative work, such as a book, film, song or article. -
<code>Marks a fragment of computer code, such as a function, file name or command. -
<data>Pairs human-readable content with a machine-readable value. -
<del>Marks content that has been removed from the document. -
<dfn>Marks the place where a term is defined. -
<em>Marks stress emphasis that changes how a sentence is understood. -
<i>Marks text in an alternate voice or mood, such as foreign words or technical terms. -
<ins>Marks content that has been added to the document. -
<kbd>Marks user input, such as keys, keyboard shortcuts or typed commands. -
<mark>Highlights text because of its relevance in the current context. -
<q>Wraps a short quotation that runs inside a sentence. -
<rp>Supplies fallback parentheses around ruby text for browsers without ruby support. -
<rt>Holds the annotation text of a ruby pair, shown above or beside the base. -
<ruby>Attaches small annotations, such as pronunciation guides, to base text. -
<s>Marks text that is no longer accurate or relevant, shown with a line through it. -
<samp>Marks sample or quoted output from a program, script or computer system. -
<small>Marks side comments and fine print, such as disclaimers, licenses and attributions. -
<span>A generic inline container with no meaning, used as a hook for styles and scripts. -
<strong>Marks text of strong importance, seriousness or urgency. -
<sub>Marks text that typographic convention places in subscript, like the 2 in H₂O. -
<sup>Marks text that typographic convention places in superscript, like the 2 in x². -
<time>Represents a date, time or duration, with an optional machine-readable value. -
<u>Marks text with a non-textual annotation, such as a flagged misspelling. -
<var>Marks the name of a variable in math, programming or a placeholder value. -
<wbr>Marks a spot where the browser may break a line if it needs to.
Images and Media
-
<area>Defines one clickable region (a hotspot) inside an image map. -
<audio>Embeds a sound file with the browser's built-in audio player. -
<img>Embeds an image, with a text alternative and optional responsive sources. -
<map>Groups <area> elements into an image map that an <img> can use. -
<track>Adds a timed text track (captions, subtitles, chapters) to a video or audio element. -
<video>Embeds a video with the browser's built-in player, captions and fallbacks. -
Audio/video DOM APIProperties, methods, events and state codes for scripting <audio> and <video>.
Embedded Content
-
<embed>Embeds an external resource, such as a PDF, handled by the browser. -
<iframe>Embeds another web page inside the current page, in its own browsing context. -
<math>The root of a MathML formula written directly in an HTML page. -
MathML elementsEvery MathML Core element (mi, mo, mfrac, msup, mtable…) and its key attributes. -
<object>Embeds an external resource, with fallback content when it can't be shown. -
<picture>Wraps an <img> with <source> alternatives for different screens or formats. -
<source>Lists one alternative file for a <picture>, <video> or <audio> element. -
<svg>Draws scalable vector graphics directly inside an HTML page.
SVG
-
SVG shapes<rect>, <circle>, <ellipse>, <line>, <polyline>, <polygon> and <path> with all path commands. -
SVG structure<g>, <defs>, <symbol>, <use>, nested <svg>, viewBox and preserveAspectRatio. -
SVG gradients and patterns<linearGradient>, <radialGradient>, <stop> and <pattern>: fills beyond a single color. -
SVG presentation attributesfill, stroke-*, opacity, transform and text attributes, with their CSS equivalents.
Scripting
-
<canvas>A bitmap drawing surface that you paint on with JavaScript. -
Canvas 2D contextMethods and properties of getContext('2d'), grouped by task, with live examples. -
<noscript>Content that is used only when scripting is disabled. -
<script>Embeds or loads JavaScript, module scripts, import maps or data blocks.
Tables
-
<caption>Gives a table a title that describes what the data is about. -
<col>Represents one or more columns inside a column group. -
<colgroup>Groups one or more table columns so they can be styled together. -
<table>Represents data in a grid of rows and columns. -
<tbody>Groups the rows that make up the main data of a table. -
<td>A data cell in a table row. -
<tfoot>Groups the summary rows, such as totals, at the bottom of a table. -
<th>A header cell that labels a row, a column, or a group of them. -
<thead>Groups the rows that hold a table's column headings. -
<tr>A row of cells in a table.
Forms
-
<button>A clickable button that submits a form, resets it, or runs your own script. -
<datalist>A list of suggested values that an input offers while the user types. -
<fieldset>Groups related form controls, usually with a <legend> caption. -
<form>A container for controls whose values are sent together as one submission. -
<input>A form control whose behavior depends on its type, from text fields to checkboxes. -
<input> typesEvery value of the input type attribute, with its value format and attributes. -
<label>A caption for a form control that also gives it its accessible name. -
<legend>The caption of a <fieldset>, naming a group of form controls. -
<meter>A gauge showing a measurement within a known range, such as disk usage. -
<optgroup>A labeled group of options inside a <select>. -
<option>One choice in a <select>, or one suggestion in a <datalist>. -
<output>Shows the result of a calculation or a user action, usually updated by a script. -
<progress>A progress bar showing how much of a task is complete. -
<select>A control for choosing one or more options from a fixed list. -
<textarea>A multi-line text field for comments, messages and other longer text.
Interactive Elements
Web Components
Obsolete Elements
-
<acronym>Obsolete markup for acronyms; use <abbr> for every kind of abbreviation. -
<applet>Obsolete element that embedded Java applets; rebuild the feature with HTML, CSS and JavaScript. -
<basefont>Obsolete element for a page-wide default font; set font styles on body with CSS. -
<big>Obsolete element that enlarged text; use CSS font-size or a meaningful element. -
<center>Obsolete element that centered its content; center things with CSS instead. -
<dir>Obsolete list element for directory listings; use <ul> instead. -
<font>Obsolete element for text color, size and typeface; use CSS instead. -
<frame>Obsolete pane of a frameset; use CSS layout or an <iframe> instead. -
<frameset>Obsolete element that split the window into frames; build layouts with CSS. -
<keygen>Obsolete form control that generated key pairs; use the Web Crypto API or WebAuthn. -
<marquee>Obsolete element that scrolled text automatically; prefer static text or a pausable CSS animation. -
<noframes>Obsolete fallback content for browsers that could not display frames. -
<param>Obsolete element that passed name/value settings to a plugin in <object> or <applet>. -
<strike>Obsolete strikethrough element; use <s>, <del> or CSS text-decoration. -
<tt>Obsolete monospace text element; use <code>, <kbd>, <samp> or CSS instead.
Attributes and Events
-
All attributesAn A–Z list of every current HTML attribute and the elements that use it. -
Global attributesAttributes that work on every HTML element, with their values and examples. -
Event attributesThe on* event handler attributes, grouped by category, with addEventListener equivalents. -
ARIA referenceWAI-ARIA roles, aria-* states and properties, and the implicit roles of HTML elements.
Characters and Codes
-
Character entitiesNamed, decimal and hex character references for over 370 common characters. -
Color namesAll 148 CSS named colors with swatches, hex and rgb() values, grouped by hue. -
ASCII tableAll 128 ASCII codes with decimal, hex, character and description. -
URL encodingPercent-encoding for special ASCII characters, spaces and UTF-8 text, with a live encoder. -
Character setsUTF-8, UTF-16, Windows-1252 and legacy encodings, their labels, and how to declare UTF-8. -
Language codesBCP 47 language tags for the lang attribute, with 142 ISO 639-1 codes and examples. -
MIME typesMedia types for HTML, CSS, JS, images, fonts, audio, video, documents and archives. -
HTTP status codesEvery standard 1xx–5xx HTTP status code, what it means and when you'll see it. -
HTTP methodsGET, POST, PUT, PATCH, DELETE and the rest, with safety, idempotency and form support. -
DoctypesThe HTML doctype, legacy HTML 4.01 and XHTML doctypes, and the rendering mode each triggers.
Nessun risultato per “”. Prova la ricerca nel sito.
Nessun risultato per “”. Prova la ricerca nel sito.