HTML Reference


Our HTML Reference Guide helps you find HTML answers quickly.

We cover all HTML elements and attributes -- with examples.

Try the examples live in our unique online HTML Editor.

What is HTML

HTML is a markup language that allows you to create web pages.

This language is made up of different HTML tags -- there are about 100 different tags.

An HTML tag can define a paragraph, an image, a table, a list, a dropdown, and much more.

Other tags define areas, such as, headers, articles, sections, and others.


HTML tags are the building blocks of web pages.
To write a tag you wrap a tag name with angle brackets, '<' and '>', for example <caption>

Here is the general syntax with an opening tag and a closing tag:

<tagname> ... </tagname>

Below are some examples.

For a complete list of tags see our HTML Tag List Reference

HTML Tag Groups

HTML tags often work together with other tags to create more complex UI features. For example, creating a table requires at least 3 different tags: <table>, <tr>, and <td>.

We refer to these cooperating tags as Tag Groups.
Several tag groups can be identified.

  • Page group - defines the page structure including meta data.
  • Layout group - defines page layouts with headers, navbars, etc.
  • Table group - defines tables for tabular data displays.
  • Form group - defines forms for data entry.
  • Text group - defines formatted text documents.
  • List group - defines ordered and unordered lists with data items.
  • Media group - defines multimedia experiences with audio, video, etc.

HTML Attributes

Attributes add additional information to a tag by modifying the appearance or functionality of an element. Here is the general syntax with an attribute inside the opening tag:

<tagname attribute="value"> ... </tagname>

Where attribute is the name of the attribute, and value is the value of the attribute.
Below are some attribute examples.

  • href - defines the URL for a link
  • type - defines a type of an element
  • name - assigns a name to an element
  • readonly -- sets a control to read-only
  • src - specifies the source (URL) of an element
  • width - defines an element's width in pixels
  • maxlength - sets the maximum length for an input element

For a complete list of attributes see our HTML Attributes Reference

HTML Global Attributes

Global attributes are attributes that can be applied to any HTML element.
Here are some examples.

  • id - adds a unique identifier to an element.
  • class - adds a CSS class to an element to quickly style an element.
  • style - adds CSS styles directly to an element.
  • data-* - adds a hidden data item to an element.
  • hidden - makes an element invisible.

For a complete list see our HTML Global Attributes Reference

HTML Methods and Codes

Our Tag References include HTML Method and HTML Code lists for easy reference.
These include:

Did you know?

Did you know?

HTML was invented in 1989, which is 33 years ago

Tim Berners-Lee is the inventor of HTML and the Web. This started in 1989.

Initially HTML was designed as a way to format scientific documents and reports.

Later it was enhanced with data entry options, such as input controls.

For application design, HTML is still rather basic, but it is the only standard we have.

You may also like

Last updated on Sep 30, 2023