Analytics choices

Analytics is optional. If allowed, Google measures public pages, navigation, recognized acquisition sources and engagement, including tool and playground use. The site excludes entered code, search terms and form contents from its Analytics events. You can withdraw here. This choice does not change advertising consent.

Read about Analytics and your information.

HTML Reference

HTML tag, attribute, character, color and compatibility reference guides.

Quick Answer

What is the HTML Reference?

Use this reference collection to look up selected HTML elements, attributes, character encoding, colors and compatibility guidance. Legacy element pages are labelled. Consult the current HTML Standard for the full element definitions.

Browse the element and attribute guides for syntax and examples. The collection includes historical material; verify current conformance and browser behavior when using it in a new project.

Tags HTML guides
Attrs Reference guides
Check Check each feature

Quick Reference

๐Ÿ“„ Document Structure

Tag Description
<!DOCTYPE> Defines the document type
<html> Defines an HTML document
<head> Contains metadata/information for the document
<title> Defines a title for the document
<body> Defines the document's body
<meta> Defines metadata about an HTML document

๐Ÿ“ Text Content

Tag Description
<h1> to <h6> Defines HTML headings
<p> Defines a paragraph
<br> Inserts a single line break
<hr> Defines a thematic change in the content
<strong> Defines important text
<em> Defines emphasized text

๐Ÿ”— Links and Media

Tag Description
<a> Defines a hyperlink
<img> Defines an image
<video> Defines a video or movie
<audio> Defines sound content
<iframe> Defines an inline frame
<link> Defines the relationship between a document and an external resource

๐Ÿ“ Forms

Tag Description
<form> Defines an HTML form for user input
<input> Defines an input control
<textarea> Defines a multiline input control (text area)
<button> Defines a clickable button
<select> Defines a drop-down list
<label> Defines a label for an <input> element

Global Attributes

Global attributes are attributes that can be used with any HTML element:

Attribute Description
class Specifies one or more classnames for an element
id Specifies a unique id for an element
style Specifies an inline CSS style for an element
title Specifies extra information about an element
lang Specifies the language of the element's content
dir Specifies the text direction for the content in an element
hidden Specifies that an element is not yet, or is no longer, relevant
data-* Used to store custom data private to the page or application

Complete Reference Sections

๐Ÿ“‹ Tags and Elements

๐ŸŽจ Styling and Media

๐ŸŒ Web Standards

๐Ÿ”ง Tools and Utilities

How to Use This Reference

1

Find the Element

Use the navigation or browse the categories above to find the HTML element you're looking for.

2

Check Browser Support

Each element page includes browser support information to ensure compatibility.

3

Try the Examples

All reference pages include practical examples that you can test in our code playground.

๐Ÿ’ก Quick Tip:

Use Ctrl+F (or Cmd+F on Mac) to quickly search for specific tags or attributes on any reference page.