HTML Tag Reference

TagDescription
<!–…–>Defines a comment
<!DOCTYPE> Defines the document type
<a>Defines a hyperlink
<abbr>Defines an abbreviation or an acronym
<acronym>Not supported in HTML5. Use <abbr> instead.
Defines an acronym
<address>Defines contact information for the author/owner of a document
<applet>Not supported in HTML5. Use <embed> or <object> instead.
Defines an embedded applet
<area>Defines an area inside an image map
<article>Defines an article
<aside>Defines content aside from the page content
<audio>Defines embedded sound content
<b>Defines bold text
<base>Specifies the base URL/target for all relative URLs in a document
<basefont>Not supported in HTML5. Use CSS instead.
Specifies a default color, size, and font for all text in a document
<bdi>Isolates a part of text that might be formatted in a different direction from other text outside it
<bdo>Overrides the current text direction
<big>Not supported in HTML5. Use CSS instead.
Defines big text
<blockquote>Defines a section that is quoted from another source
<body>Defines the document’s body
<br>Defines a single line break
<button>Defines a clickable button
<canvas>Used to draw graphics, on the fly, via scripting (usually JavaScript)
<caption>Defines a table caption
<center>Not supported in HTML5. Use CSS instead.
Defines centered text
<cite>Defines the title of a work
<code>Defines a piece of computer code
<col>Specifies column properties for each column within a <colgroup> element 
<colgroup>Specifies a group of one or more columns in a table for formatting
<data>Adds a machine-readable translation of a given content
<datalist>Specifies a list of pre-defined options for input controls
<dd>Defines a description/value of a term in a description list
<del>Defines text that has been deleted from a document
<details>Defines additional details that the user can view or hide
<dfn>Specifies a term that is going to be defined within the content
<dialog>Defines a dialog box or window
<dir>Not supported in HTML5. Use <ul> instead.
Defines a directory list
<div>Defines a section in a document
<dl>Defines a description list
<dt>Defines a term/name in a description list
<em>Defines emphasized text 
<embed>Defines a container for an external application
<fieldset>Groups related elements in a form
<figcaption>Defines a caption for a <figure> element
<figure>Specifies self-contained content
<font>Not supported in HTML5. Use CSS instead.
Defines font, color, and size for text
<footer>Defines a footer for a document or section
<form>Defines an HTML form for user input
<frame>Not supported in HTML5.
Defines a window (a frame) in a frameset
<frameset>Not supported in HTML5.
Defines a set of frames
<h1> to <h6>Defines HTML headings
<head>Contains metadata/information for the document
<header>Defines a header for a document or section
<hr>Defines a thematic change in the content
<html>Defines the root of an HTML document
<i>Defines a part of text in an alternate voice or mood
<iframe>Defines an inline frame
<img>Defines an image
<input>Defines an input control
<ins>Defines a text that has been inserted into a document
<kbd>Defines keyboard input
<label>Defines a label for an <input> element
<legend>Defines a caption for a <fieldset> element
<li>Defines a list item
<link>Defines the relationship between a document and an external resource (most used to link to style sheets)
<main>Specifies the main content of a document
<map>Defines an image map
<mark>Defines marked/highlighted text
<meta>Defines metadata about an HTML document
<meter>Defines a scalar measurement within a known range (a gauge)
<nav>Defines navigation links
<noframes>Not supported in HTML5.
Defines an alternate content for users that do not support frames
<noscript>Defines an alternate content for users that do not support client-side scripts
<object>Defines a container for an external application
<ol>Defines an ordered list
<optgroup>Defines a group of related options in a drop-down list
<option>Defines an option in a drop-down list
<output>Defines the result of a calculation
<p>Defines a paragraph
<param>Defines a parameter for an object
<picture>Defines a container for multiple image resources
<pre>Defines preformatted text
<progress>Represents the progress of a task
<q>Defines a short quotation
<rp>Defines what to show in browsers that do not support ruby annotations
<rt>Defines an explanation/pronunciation of characters (for East Asian typography)
<ruby>Defines a ruby annotation (for East Asian typography)
<s>Defines text that is no longer correct
<samp>Defines sample output from a computer program
<script>Defines a client-side script
<section>Defines a section in a document
<select>Defines a drop-down list
<small>Defines smaller text
<source>Defines multiple media resources for media elements (<video> and <audio>)
<span>Defines a section in a document
<strike>Not supported in HTML5. Use <del> or <s> instead.
Defines strikethrough text
<strong>Defines important text
<style>Defines style information for a document
<sub>Defines subscripted text
<summary>Defines a visible heading for a <details> element
<sup>Defines superscripted text
<svg>Defines a container for SVG graphics
<table>Defines a table
<tbody>Groups the body content in a table
<td>Defines a cell in a table
<template>Defines a container for content that should be hidden when the page loads
<textarea>Defines a multiline input control (text area)
<tfoot>Groups the footer content in a table
<th>Defines a header cell in a table
<thead>Groups the header content in a table
<time>Defines a specific time (or datetime)
<title>Defines a title for the document
<tr>Defines a row in a table
<track>Defines text tracks for media elements (<video> and <audio>)
<tt>Not supported in HTML5. Use CSS instead.
Defines teletype text
<u>Defines some text that is unarticulated and styled differently from normal text
<ul>Defines an unordered list
<var>Defines a variable
<video>Defines embedded video content
<wbr>Defines a possible line-break

Basic HTML

TagDescription
<!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
<h1> to <h6>Defines HTML headings
<p>Defines a paragraph
<br>Inserts a single line break
<hr>Defines a thematic change in the content
<!–…–>Defines a comment

Formatting

TagDescription
<acronym>Not supported in HTML5. Use <abbr> instead.
Defines an acronym
<abbr>Defines an abbreviation or an acronym
<address>Defines contact information for the author/owner of a document/article
<b>Defines bold text
<bdi>Isolates a part of text that might be formatted in a different direction from other text outside it
<bdo>Overrides the current text direction
<big>Not supported in HTML5. Use CSS instead.
Defines big text
<blockquote>Defines a section that is quoted from another source
<center>Not supported in HTML5. Use CSS instead.
Defines centered text
<cite>Defines the title of a work
<code>Defines a piece of computer code
<del>Defines text that has been deleted from a document
<dfn>Specifies a term that is going to be defined within the content
<em>Defines emphasized text 
<font>Not supported in HTML5. Use CSS instead.
Defines font, color, and size for text
<i>Defines a part of text in an alternate voice or mood
<ins>Defines a text that has been inserted into a document
<kbd>Defines keyboard input
<mark>Defines marked/highlighted text
<meter>Defines a scalar measurement within a known range (a gauge)
<pre>Defines preformatted text
<progress>Represents the progress of a task
<q>Defines a short quotation
<rp>Defines what to show in browsers that do not support ruby annotations
<rt>Defines an explanation/pronunciation of characters (for East Asian typography)
<ruby>Defines a ruby annotation (for East Asian typography)
<s>Defines text that is no longer correct
<samp>Defines sample output from a computer program
<small>Defines smaller text
<strike>Not supported in HTML5. Use <del> or <s> instead.
Defines strikethrough text
<strong>Defines important text
<sub>Defines subscripted text
<sup>Defines superscripted text
<template>Defines a container for content that should be hidden when the page loads
<time>Defines a specific time (or datetime)
<tt>Not supported in HTML5. Use CSS instead.
Defines teletype text
<u>Defines some text that is unarticulated and styled differently from normal text
<var>Defines a variable
<wbr>Defines a possible line-break


Forms and Input

TagDescription
<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
<optgroup>Defines a group of related options in a drop-down list
<option>Defines an option in a drop-down list
<label>Defines a label for an <input> element
<fieldset>Groups related elements in a form
<legend>Defines a caption for a <fieldset> element
<datalist>Specifies a list of pre-defined options for input controls
<output>Defines the result of a calculation

Frames

TagDescription
<frame>Not supported in HTML5.
Defines a window (a frame) in a frameset
<frameset>Not supported in HTML5.
Defines a set of frames
<noframes>Not supported in HTML5.
Defines an alternate content for users that do not support frames
<iframe>Defines an inline frame

Images

TagDescription
<img>Defines an image
<map>Defines a client-side image map
<area>Defines an area inside an image map
<canvas>Used to draw graphics, on the fly, via scripting (usually JavaScript)
<figcaption>Defines a caption for a <figure> element
<figure>Specifies self-contained content
<picture>Defines a container for multiple image resources
<svg>Defines a container for SVG graphics

Audio / Video

TagDescription
<audio>Defines sound content
<source>Defines multiple media resources for media elements (<video>, <audio> and <picture>)
<track>Defines text tracks for media elements (<video> and <audio>)
<video>Defines a video or movie

Links

TagDescription
<a>Defines a hyperlink
<link>Defines the relationship between a document and an external resource (most used to link to style sheets)
<nav>Defines navigation links

Lists

TagDescription
<ul>Defines an unordered list
<ol>Defines an ordered list
<li>Defines a list item
<dir>Not supported in HTML5. Use <ul> instead.
Defines a directory list
<dl>Defines a description list
<dt>Defines a term/name in a description list
<dd>Defines a description of a term/name in a description list

Tables

TagDescription
<table>Defines a table
<caption>Defines a table caption
<th>Defines a header cell in a table
<tr>Defines a row in a table
<td>Defines a cell in a table
<thead>Groups the header content in a table
<tbody>Groups the body content in a table
<tfoot>Groups the footer content in a table
<col>Specifies column properties for each column within a <colgroup> element
<colgroup>Specifies a group of one or more columns in a table for formatting

Styles and Semantics

TagDescription
<style>Defines style information for a document
<div>Defines a section in a document
<span>Defines a section in a document
<header>Defines a header for a document or section
<footer>Defines a footer for a document or section
<main>Specifies the main content of a document
<section>Defines a section in a document
<article>Defines an article
<aside>Defines content aside from the page content
<details>Defines additional details that the user can view or hide
<dialog>Defines a dialog box or window
<summary>Defines a visible heading for a <details> element
<data>Adds a machine-readable translation of a given content

Meta Info

TagDescription
<head>Defines information about the document
<meta>Defines metadata about an HTML document
<base>Specifies the base URL/target for all relative URLs in a document
<basefont>Not supported in HTML5. Use CSS instead.
Specifies a default color, size, and font for all text in a document

Programming

TagDescription
<script>Defines a client-side script
<noscript>Defines an alternate content for users that do not support client-side scripts
<applet>Not supported in HTML5. Use <embed> or <object> instead.
Defines an embedded applet
<embed>Defines a container for an external (non-HTML) application
<object>Defines an embedded object
<param>Defines a parameter for an object

HTML Reference With Browser Support

The table below lists all HTML elements and their attributes, along with browser support:

 
<a>YesYesYesYesYes
download14.018.020.010.115.0
hrefYesYesYesYesYes
hreflangYesYesYesYesYes
mediaYesYesYesYesYes
pingYesNoYesNoYes
referrerpolicy51.0No50.011.138.0
relYesYesYesYesYes
targetYesYesYesYesYes
typeYesYesYesYesYes
 
<abbr>YesYesYesYesYes
 
<address>YesYesYesYesYes
 
<area>YesYesYesYesYes
altYesYesYesYesYes
coordsYesYesYesYesYes
downloadYesYesYesYesYes
hrefYesYesYesYesYes
hreflangYesYesYesYesYes
mediaYesYesYesYesYes
referrerpolicy51.0No50.011.138.0
relYesYesYesYesYes
shapeYesYesYesYesYes
targetYesYesYesYesYes
typeYesYesYesYesYes
 
<article>6.09.04.05.011.1
 
<aside>6.09.04.05.011.1
 
<audio>4.09.03.54.011.5
autoplay4.09.03.54.011.5
controls4.09.03.54.011.5
loop4.09.03.54.011.5
muted4.010.011.07.111.5
preload4.09.04.04.011.5
src4.09.03.54.011.5
 
<b>YesYesYesYesYes
 
<base>YesYesYesYesYes
hrefYesYesYesYesYes
targetYesYesYesYesYes
 
<bdi>16.079.010.0No15.0
 
<bdo>YesYesYesYesYes
dirYesYesYesYesYes
 
<blockquote>YesYesYesYesYes
citeYesYesYesYesYes
 
<body>YesYesYesYesYes
 
<br>YesYesYesYesYes
 
<button>YesYesYesYesYes
autofocus5.010.04.05.09.6
disabledYesYesYesYesYes
form10.016.04.05.19.5
formaction9.010.04.05.115.0
formenctype9.010.04.05.111.5
formmethod9.010.04.05.115.0
formnovalidate6.011.04.0YesYes
formtarget9.010.04.05.110.6
nameYesYesYesYesYes
typeYesYesYesYesYes
valueYesYesYesYesYes
 
<canvas>4.09.02.03.19.0
height4.09.02.03.19.0
width4.09.02.03.19.0
 
<caption>YesYesYesYesYes
 
<cite>YesYesYesYesYes
 
<code>YesYesYesYesYes
 
<col>YesYesYesYesYes
spanYesYesYesYesYes
 
<colgroup>YesYesYesYesYes
spanYesYesYesYesYes
 
<data>62.013.022.0No49.0
value62.013.022.0No49.0
 
<datalist>20.010.04.012.19.5
 
<dd>YesYesYesYesYes
 
<del>YesYesYesYesYes
citeYesYesYesYesYes
datetimeYesYesYesYesYes
 
<details>12.0 79.049.06.015.0
open12.079.049.06.015.0
 
<dfn>YesYesYesYesYes
 
<dialog>37.079.053.0*No24.0
open37.079.053.0*No24.0

* Not supported by default, but can be enabled in about:config (set dom.dialog_element.enabled to true).

 
<div>YesYesYesYesYes
 
<dl>YesYesYesYesYes
 
<dt>YesYesYesYesYes
 
<em>YesYesYesYesYes
 
<embed>YesYesYesYesYes
heightYesYesYesYesYes
srcYesYesYesYesYes
typeYesYesYesYesYes
widthYesYesYesYesYes
 
<fieldset>YesYesYesYesYes
disabledYesYesYes6.0Yes
formYesYesYesYesYes
nameYes11.0YesYesYes
 
<figcaption>8.09.04.05.111.0
 
<figure>8.09.04.05.111.0
 
<footer>5.09.04.05.011.1
 
<form>YesYesYesYesYes
accept-charsetYesYesYesYesYes
actionYesYesYesYesYes
autocompleteYesYes4.05.215.0
enctypeYesYesYesYesYes
methodYesYesYesYesYes
nameYesYesYesYesYes
novalidateYes10.04.010.115.0
relYesYesYesYesYes
targetYesYesYesYesYes
 
<h1> – <h6>YesYesYesYesYes
 
<head>YesYesYesYesYes
 
<header>5.0 9.04.05.011.1
 
<hr>YesYesYesYesYes
 
<html>YesYesYesYesYes
xmlnsYesYesYesYesYes
 
<i>YesYesYesYesYes
 
<iframe>YesYesYesYesYes
allow60.079.074.011.147.0
allowfullscreen27.011.0 -ms-18.07.0Yes
allowpaymentrequestNoNoNoNoNo
heightYesYesYesYesYes
nameYesYesYesYesYes
referrerpolicy51.079.050.011.138.0
sandbox4.010.017.05.015.0
srcYesYesYesYesYes
srcdoc20.079.025.06.015.0
widthYesYesYesYesYes
 
<img>YesYesYesYesYes
altYesYesYesYesYes
crossoriginYesYesYesYesYes
heightYesYesYesYesYes
ismapYesYesYesYesYes
loading77.079.075.0No64.0
longdescYesYesYesYesYes
referrerpolicy51.079.050.011.138.0
sizesYesYesYesYesYes
srcYesYesYesYesYes
srcset34.0?38.08.021.0
usemapYesYesYesYesYes
widthYesYesYesYesYes
 
<input>YesYesYesYesYes
accept26.010.037.011.115.0
altYesYesYesYesYes
autocomplete17.06.02.05.110.0
autofocus5.011.04.05.09.6
checkedYesYesYesYesYes
dirnameYes79.0NoYesYes
disabledYesYesYesYesYes
formYesYesYes5.110.6
formactionYes10.0Yes5.110.6
formenctypeYes10.0Yes5.110.6
formmethodYes10.0Yes5.110.6
formnovalidateYes10.0Yes10.110.6
formtargetYes10.0Yes5.110.6
heightYesYes16.0YesYes
list20.010.04.0No9.6
max5.010.016.05.110.6
maxlength4.010.04.05.115.0
min5.010.016.05.110.6
minlength40.017.051.010.127.0
multiple6.010.03.65.011.0
nameYesYesYesYesYes
pattern5.010.04.010.19.6
placeholder10.010.04.05.011.0
readonlyYesYesYesYesYes
required5.010.04.010.19.6
sizeYesYesYesYesYes
srcYesYesYesYesYes
step6.010.016.05.010.6
typeYesYesYesYesYes
valueYesYesYesYesYes
widthYesYes16.0YesYes
 
<ins>YesYesYesYesYes
citeYesYesYesYesYes
datetimeYesYesYesYesYes
 
<kbd>YesYesYesYesYes
 
<label>YesYesYesYesYes
forYesYesYesYesYes
formYesYesYesYesYes
 
<legend>YesYesYesYesYes
 
<li>YesYesYesYesYes
valueYesYesYesYesYes
 
<link>YesYesYesYesYes
crossorigin25.079.018.0?15.0
hrefYesYesYesYesYes
hreflangYesYesYesYesYes
mediaYesYesYesYesYes
referrerpolicy51.079.050.011.138.0
relYesYesYesYesYes
sizesNoNoNoNoNo
titleYesYesYesYesYes
typeYesYesYesYesYes
 
<main>26.012.021.07.016.0
 
<map>YesYesYesYesYes
nameYesYesYesYesYes
 
<mark>6.09.04.05.011.1
 
<meta>YesYesYesYesYes
charsetYesYesYesYesYes
contentYesYesYesYesYes
http_equivYesYesYesYesYes
nameYesYesYesYesYes
 
<meter>8.013.016.06.011.5
formNoNoNoNoNo
high8.013.016.06.011.5
low8.013.016.06.011.5
max8.013.016.06.011.5
min8.013.016.06.011.5
optimum8.013.016.06.011.5
value8.013.016.06.011.5
 
<nav>5.09.04.05.011.1
 
<noscript>YesYesYesYesYes
 
<object>YesYesYesYesYes
dataYesYesYesYesYes
formNoNoNoNoNo
heightYesYesYesYesYes
nameYesYesYesYesYes
typeYesYesYesYesYes
usemapNoNoYesNoNo
widthYesYesYesYesYes
 
<ol>YesYesYesYesYes
reversed18.079.018.06.012.1
startYesYesYesYesYes
typeYesYesYesYesYes
 
<optgroup>YesYesYesYesYes
disabledYes8.0YesYesYes
labelYesYesYesYesYes
 
<option>YesYesYesYesYes
disabledYes8.0YesYesYes
labelYes8.0NoYesYes
selectedYesYesYesYesYes
valueYesYesYesYesYes
 
<output>10.013.04.05.111.0
for10.013.04.07.011.5
formNoNoNoNoNo
name10.013.04.07.011.5
 
<p>YesYesYesYesYes
 
<param>YesYesYesYesYes
nameYesYesYesYesYes
valueYesYesYesYesYes
 
<picture>38.013.038.09.125.0
 
<pre>YesYesYesYesYes
 
<progress>8.010.016.06.011.0
max8.010.016.06.011.0
value8.010.016.06.011.0
 
<q>YesYesYesYesYes
citeYesYesYesYesYes
 
<rp>5.05.538.05.015.0
 
<rt>5.05.538.05.015.0
 
<ruby>5.05.538.05.015.0
 
<s>YesYesYesYesYes
 
<samp>YesYesYesYesYes
 
<script>YesYesYesYesYes
async8.010.03.65.115.0
charsetYesYesYesYesYes
crossorigin30.018.013.013.012.1
defer8.010.03.55.015.0
integrity45.017.043.013.066.0
referrerpolicy70.079.065.0YesNo
srcYesYesYesYesYes
typeYesYesYesYesYes
 
<section>5.09.04.05.011.5
 
<select>YesYesYesYesYes
autofocusYes10.0NoYesYes
disabledYes9.0YesYesYes
formYesYesYesYesYes
multipleYesYesYesYesYes
nameYesYesYesYesYes
requiredYes10.04.0YesYes
sizeYesYesYesYesYes
 
<slot>53.079.063.010.040.0
 
<small>YesYesYesYesYes
 
<source>4.09.03.54.010.5
media38.09.015.09.125.0
sizes38.013.03.89.125.0
src4.09.03.54.010.5
srcset38.013.038.09.125.0
type4.09.03.54.010.5
 
<span>YesYesYesYesYes
 
<strong>YesYesYesYesYes
 
<style>YesYesYesYesYes
mediaYesYesYesYesYes
typeYesYesYesYesYes
 
<sub>YesYesYesYesYes
 
<summary>12.079.049.06.015.0
 
<sup>YesYesYesYesYes
 
<svg>4.09.03.03.210.1
 
<table>YesYesYesYesYes
 
<tbody>YesYesYesYesYes
 
<td>YesYesYesYesYes
colspanYesYesYesYesYes
headersYesYesYesYesYes
rowspanYesYesYesYesYes
 
<template>26.013.022.08.015.0
 
<textarea>YesYesYesYesYes
autocompleteNoNo59.013.0No
autofocusYes10.04.0YesYes
colsYesYesYesYesYes
dirnameYes79.0NoYesYes
disabledYesYesYesYesYes
formYes11.0YesYesYes
maxlengthYes10.04.0YesYes
minlengthYesYesYesYesYes
nameYesYesYesYesYes
placeholderYes10.04.05.011.5
readonlyYesYesYesYesYes
requiredYes10.04.0YesYes
rowsYesYesYesYesYes
spellcheckYes11.0YesYesYes
wrapYesYesYesYesYes
 
<tfoot>YesYesYesYesYes
 
<th>YesYesYesYesYes
abbrYesYesYesYesYes
colspanYesYesYesYesYes
headersYesYesYesYesYes
rowspanYesYesYesYesYes
scopeYesYesYesYesYes
 
<thead>YesYesYesYesYes
 
<time>62.018.022.07.049.0
datetime62.018.022.07.049.0
 
<title>YesYesYesYesYes
 
<tr>YesYesYesYesYes
 
<track>23.010.031.06.012.1
default23.010.031.06.012.1
kind23.010.031.06.012.1
label23.010.031.06.012.1
src23.010.031.06.012.1
srclang23.010.031.06.012.1
 
<u>YesYesYesYesYes
 
<ul>YesYesYesYesYes
 
<var>YesYesYesYesYes
 
<video>4.09.03.53.111.5
autoplay4.09.03.53.111.5
controls4.09.03.53.111.5
height4.09.03.53.111.5
loop4.09.011.03.111.5
muted30.010.011.05.0Yes
poster4.09.03.63.110.5
preload4.09.04.03.110.5
src4.09.03.53.111.5
width4.09.03.53.111.5
 
<wbr>YesYesYesYesYes

HTML Attribute Reference

The table below lists all HTML attributes and what elements they can be used within:

AttributeBelongs toDescription
accept<input>Specifies the types of files that the server accepts (only for type=”file”)
accept-charset<form>Specifies the character encodings that are to be used for the form submission
accesskeyGlobal AttributesSpecifies a shortcut key to activate/focus an element
action<form>Specifies where to send the form-data when a form is submitted
alignNot supported in HTML 5.Specifies the alignment according to surrounding elements. Use CSS instead
alt<area><img><input>Specifies an alternate text when the original element fails to display
async<script>Specifies that the script is executed asynchronously (only for external scripts)
autocomplete<form><input>Specifies whether the <form> or the <input> element should have autocomplete enabled
autofocus<button><input><select><textarea>Specifies that the element should automatically get focus when the page loads
autoplay<audio><video>Specifies that the audio/video will start playing as soon as it is ready
bgcolorNot supported in HTML 5.Specifies the background color of an element. Use CSS instead
borderNot supported in HTML 5.Specifies the width of the border of an element. Use CSS instead
charset<meta><script>Specifies the character encoding
checked<input>Specifies that an <input> element should be pre-selected when the page loads (for type=”checkbox” or type=”radio”)
cite<blockquote>, <del><ins>, <q>Specifies a URL which explains the quote/deleted/inserted text
classGlobal AttributesSpecifies one or more classnames for an element (refers to a class in a style sheet)
colorNot supported in HTML 5.Specifies the text color of an element. Use CSS instead
cols<textarea>Specifies the visible width of a text area
colspan<td><th>Specifies the number of columns a table cell should span
content<meta>Gives the value associated with the http-equiv or name attribute
contenteditableGlobal AttributesSpecifies whether the content of an element is editable or not
controls<audio><video>Specifies that audio/video controls should be displayed (such as a play/pause button etc)
coords<area>Specifies the coordinates of the area
data<object>Specifies the URL of the resource to be used by the object
data-*Global AttributesUsed to store custom data private to the page or application
datetime<del><ins><time>Specifies the date and time
default<track>Specifies that the track is to be enabled if the user’s preferences do not indicate that another track would be more appropriate
defer<script>Specifies that the script is executed when the page has finished parsing (only for external scripts)
dirGlobal AttributesSpecifies the text direction for the content in an element
dirname<input><textarea>Specifies that the text direction will be submitted
disabled<button><fieldset><input>, <optgroup>, <option><select><textarea>Specifies that the specified element/group of elements should be disabled
download<a><area>Specifies that the target will be downloaded when a user clicks on the hyperlink
draggableGlobal AttributesSpecifies whether an element is draggable or not
enctype<form>Specifies how the form-data should be encoded when submitting it to the server (only for method=”post”)
for<label>, <output>Specifies which form element(s) a label/calculation is bound to
form<button><fieldset><input>, <label>, <meter><object><output><select><textarea>Specifies the name of the form the element belongs to
formaction<button><input>Specifies where to send the form-data when a form is submitted. Only for type=”submit”
headers<td><th>Specifies one or more headers cells a cell is related to
height<canvas>, <embed><iframe><img><input><object><video>Specifies the height of the element
hiddenGlobal AttributesSpecifies that an element is not yet, or is no longer, relevant
high<meter>Specifies the range that is considered to be a high value
href<a><area><base><link>Specifies the URL of the page the link goes to
hreflang<a><area><link>Specifies the language of the linked document
http-equiv<meta>Provides an HTTP header for the information/value of the content attribute
idGlobal AttributesSpecifies a unique id for an element
ismap<img>Specifies an image as a server-side image map
kind<track>Specifies the kind of text track
label<track><option><optgroup>Specifies the title of the text track
langGlobal AttributesSpecifies the language of the element’s content
list<input>Refers to a <datalist> element that contains pre-defined options for an <input> element
loop<audio><video>Specifies that the audio/video will start over again, every time it is finished
low<meter>Specifies the range that is considered to be a low value
max<input><meter><progress>Specifies the maximum value
maxlength<input><textarea>Specifies the maximum number of characters allowed in an element
media<a><area><link><source><style>Specifies what media/device the linked document is optimized for
method<form>Specifies the HTTP method to use when sending form-data
min<input><meter>Specifies a minimum value
multiple<input><select>Specifies that a user can enter more than one value
muted<video><audio>Specifies that the audio output of the video should be muted
name<button><fieldset><form><iframe><input><map><meta><object><output><param><select><textarea>Specifies the name of the element
novalidate<form>Specifies that the form should not be validated when submitted
onabort<audio><embed><img><object><video>Script to be run on abort
onafterprint<body>Script to be run after the document is printed
onbeforeprint<body>Script to be run before the document is printed
onbeforeunload<body>Script to be run when the document is about to be unloaded
onblurAll visible elements.Script to be run when the element loses focus
oncanplay<audio><embed><object><video>Script to be run when a file is ready to start playing (when it has buffered enough to begin)
oncanplaythrough<audio><video>Script to be run when a file can be played all the way to the end without pausing for buffering
onchangeAll visible elements.Script to be run when the value of the element is changed
onclickAll visible elements.Script to be run when the element is being clicked
oncontextmenuAll visible elements.Script to be run when a context menu is triggered
oncopyAll visible elements.Script to be run when the content of the element is being copied
oncuechange<track>Script to be run when the cue changes in a <track> element
oncutAll visible elements.Script to be run when the content of the element is being cut
ondblclickAll visible elements.Script to be run when the element is being double-clicked
ondragAll visible elements.Script to be run when the element is being dragged
ondragendAll visible elements.Script to be run at the end of a drag operation
ondragenterAll visible elements.Script to be run when an element has been dragged to a valid drop target
ondragleaveAll visible elements.Script to be run when an element leaves a valid drop target
ondragoverAll visible elements.Script to be run when an element is being dragged over a valid drop target
ondragstartAll visible elements.Script to be run at the start of a drag operation
ondropAll visible elements.Script to be run when dragged element is being dropped
ondurationchange<audio><video>Script to be run when the length of the media changes
onemptied<audio><video>Script to be run when something bad happens and the file is suddenly unavailable (like unexpectedly disconnects)
onended<audio><video>Script to be run when the media has reach the end (a useful event for messages like “thanks for listening”)
onerror<audio><body><embed><img><object><script><style><video>Script to be run when an error occurs
onfocusAll visible elements.Script to be run when the element gets focus
onhashchange<body>Script to be run when there has been changes to the anchor part of the a URL
oninputAll visible elements.Script to be run when the element gets user input
oninvalidAll visible elements.Script to be run when the element is invalid
onkeydownAll visible elements.Script to be run when a user is pressing a key
onkeypressAll visible elements.Script to be run when a user presses a key
onkeyupAll visible elements.Script to be run when a user releases a key
onload<body><iframe><img><input><link><script><style>Script to be run when the element is finished loading
onloadeddata<audio><video>Script to be run when media data is loaded
onloadedmetadata<audio><video>Script to be run when meta data (like dimensions and duration) are loaded
onloadstart<audio><video>Script to be run just as the file begins to load before anything is actually loaded
onmousedownAll visible elements.Script to be run when a mouse button is pressed down on an element
onmousemoveAll visible elements.Script to be run as long as the  mouse pointer is moving over an element
onmouseoutAll visible elements.Script to be run when a mouse pointer moves out of an element
onmouseoverAll visible elements.Script to be run when a mouse pointer moves over an element
onmouseupAll visible elements.Script to be run when a mouse button is released over an element
onmousewheelAll visible elements.Script to be run when a mouse wheel is being scrolled over an element
onoffline<body>Script to be run when the browser starts to work offline
ononline<body>Script to be run when the browser starts to work online
onpagehide<body>Script to be run when a user navigates away from a page
onpageshow<body>Script to be run when a user navigates to a page
onpasteAll visible elements.Script to be run when the user pastes some content in an element
onpause<audio><video>Script to be run when the media is paused either by the user or programmatically
onplay<audio><video>Script to be run when the media has started playing
onplaying<audio><video>Script to be run when the media has started playing
onpopstate<body>Script to be run when the window’s history changes.
onprogress<audio><video>Script to be run when the browser is in the process of getting the media data
onratechange<audio><video>Script to be run each time the playback rate changes (like when a user switches to a slow motion or fast forward mode).
onreset<form>Script to be run when a reset button in a form is clicked.
onresize<body>Script to be run when the browser window is being resized.
onscrollAll visible elements.Script to be run when an element’s scrollbar is being scrolled
onsearch<input>Script to be run when the user writes something in a search field (for <input=”search”>)
onseeked<audio><video>Script to be run when the seeking attribute is set to false indicating that seeking has ended
onseeking<audio><video>Script to be run when the seeking attribute is set to true indicating that seeking is active
onselectAll visible elements.Script to be run when the element gets selected
onstalled<audio><video>Script to be run when the browser is unable to fetch the media data for whatever reason
onstorage<body>Script to be run when a Web Storage area is updated
onsubmit<form>Script to be run when a form is submitted
onsuspend<audio><video>Script to be run when fetching the media data is stopped before it is completely loaded for whatever reason
ontimeupdate<audio><video>Script to be run when the playing position has changed (like when the user fast forwards to a different point in the media)
ontoggle<details>Script to be run when the user opens or closes the <details> element
onunload<body>Script to be run when a page has unloaded (or the browser window has been closed)
onvolumechange<audio><video>Script to be run each time the volume of a video/audio has been changed
onwaiting<audio><video>Script to be run when the media has paused but is expected to resume (like when the media pauses to buffer more data)
onwheelAll visible elements.Script to be run when the mouse wheel rolls up or down over an element
open<details>Specifies that the details should be visible (open) to the user
optimum<meter>Specifies what value is the optimal value for the gauge
pattern<input>Specifies a regular expression that an <input> element’s value is checked against
placeholder<input><textarea>Specifies a short hint that describes the expected value of the element
poster<video>Specifies an image to be shown while the video is downloading, or until the user hits the play button
preload<audio><video>Specifies if and how the author thinks the audio/video should be loaded when the page loads
readonly<input><textarea>Specifies that the element is read-only
rel<a><area><form><link>Specifies the relationship between the current document and the linked document
required<input><select><textarea>Specifies that the element must be filled out before submitting the form
reversed<ol>Specifies that the list order should be descending (9,8,7…)
rows<textarea>Specifies the visible number of lines in a text area
rowspan<td><th>Specifies the number of rows a table cell should span
sandbox<iframe>Enables an extra set of restrictions for the content in an <iframe>
scope<th>Specifies whether a header cell is a header for a column, row, or group of columns or rows
selected<option>Specifies that an option should be pre-selected when the page loads
shape<area>Specifies the shape of the area
size<input><select>Specifies the width, in characters (for <input>) or specifies the number of visible options (for <select>)
sizes<img><link><source>Specifies the size of the linked resource
span<col><colgroup>Specifies the number of columns to span
spellcheckGlobal AttributesSpecifies whether the element is to have its spelling and grammar checked or not
src<audio><embed><iframe><img><input><script><source><track><video>Specifies the URL of the media file
srcdoc<iframe>Specifies the HTML content of the page to show in the <iframe>
srclang<track>Specifies the language of the track text data (required if kind=”subtitles”)
srcset<img><source>Specifies the URL of the image to use in different situations
start<ol>Specifies the start value of an ordered list
step<input>Specifies the legal number intervals for an input field
styleGlobal AttributesSpecifies an inline CSS style for an element
tabindexGlobal AttributesSpecifies the tabbing order of an element
target<a><area><base><form>Specifies the target for where to open the linked document or where to submit the form
titleGlobal AttributesSpecifies extra information about an element
translateGlobal AttributesSpecifies whether the content of an element should be translated or not
type<a><button><embed><input><link><menu><object><script><source><style>Specifies the type of element
usemap<img><object>Specifies an image as a client-side image map
value<button><input><li><option><meter><progress><param>Specifies the value of the element
width<canvas>, <embed><iframe><img><input><object><video>Specifies the width of the element
wrap<textarea>Specifies how the text in a text area is to be wrapped when submitted in a form

HTML Global Attributes

The global attributes are attributes that can be used with all HTML elements.

AttributeDescription
accesskeySpecifies a shortcut key to activate/focus an element
classSpecifies one or more classnames for an element (refers to a class in a style sheet)
contenteditableSpecifies whether the content of an element is editable or not
data-*Used to store custom data private to the page or application
dirSpecifies the text direction for the content in an element
draggableSpecifies whether an element is draggable or not
hiddenSpecifies that an element is not yet, or is no longer, relevant
idSpecifies a unique id for an element
langSpecifies the language of the element’s content
spellcheckSpecifies whether the element is to have its spelling and grammar checked or not
styleSpecifies an inline CSS style for an element
tabindexSpecifies the tabbing order of an element
titleSpecifies extra information about an element
translateSpecifies whether the content of an element should be translated or not

Global Event Attributes

HTML has the ability to let events trigger actions in a browser, like starting a JavaScript when a user clicks on an element.

To learn more about programming events, please visit our JavaScript tutorial.

Below are the global event attributes that can be added to HTML elements to define event actions.


Window Event Attributes

Events triggered for the window object (applies to the <body> tag):

AttributeValueDescription
onafterprintscriptScript to be run after the document is printed
onbeforeprintscriptScript to be run before the document is printed
onbeforeunloadscriptScript to be run when the document is about to be unloaded
onerrorscriptScript to be run when an error occurs
onhashchangescriptScript to be run when there has been changes to the anchor part of the a URL
onloadscriptFires after the page is finished loading
onmessagescriptScript to be run when the message is triggered
onofflinescriptScript to be run when the browser starts to work offline
ononlinescriptScript to be run when the browser starts to work online
onpagehidescriptScript to be run when a user navigates away from a page
onpageshowscriptScript to be run when a user navigates to a page
onpopstatescriptScript to be run when the window’s history changes
onresizescriptFires when the browser window is resized
onstoragescriptScript to be run when a Web Storage area is updated
onunloadscriptFires once a page has unloaded (or the browser window has been closed)


Form Events

Events triggered by actions inside a HTML form (applies to almost all HTML elements, but is most used in form elements):

AttributeValueDescription
onblurscriptFires the moment that the element loses focus
onchangescriptFires the moment when the value of the element is changed
oncontextmenuscriptScript to be run when a context menu is triggered
onfocusscriptFires the moment when the element gets focus
oninputscriptScript to be run when an element gets user input
oninvalidscriptScript to be run when an element is invalid
onresetscriptFires when the Reset button in a form is clicked
onsearchscriptFires when the user writes something in a search field (for <input=”search”>)
onselectscriptFires after some text has been selected in an element
onsubmitscriptFires when a form is submitted

Keyboard Events

AttributeValueDescription
onkeydownscriptFires when a user is pressing a key
onkeypressscriptFires when a user presses a key
onkeyupscriptFires when a user releases a key

Mouse Events

AttributeValueDescription
onclickscriptFires on a mouse click on the element
ondblclickscriptFires on a mouse double-click on the element
onmousedownscriptFires when a mouse button is pressed down on an element
onmousemovescriptFires when the mouse pointer is moving while it is over an element
onmouseoutscriptFires when the mouse pointer moves out of an element
onmouseoverscriptFires when the mouse pointer moves over an element
onmouseupscriptFires when a mouse button is released over an element
onmousewheelscriptDeprecated. Use the onwheel attribute instead
onwheelscriptFires when the mouse wheel rolls up or down over an element

Drag Events

AttributeValueDescription
ondragscriptScript to be run when an element is dragged
ondragendscriptScript to be run at the end of a drag operation
ondragenterscriptScript to be run when an element has been dragged to a valid drop target
ondragleavescriptScript to be run when an element leaves a valid drop target
ondragoverscriptScript to be run when an element is being dragged over a valid drop target
ondragstartscriptScript to be run at the start of a drag operation
ondropscriptScript to be run when dragged element is being dropped
onscrollscriptScript to be run when an element’s scrollbar is being scrolled

Clipboard Events

AttributeValueDescription
oncopyscriptFires when the user copies the content of an element
oncutscriptFires when the user cuts the content of an element
onpastescriptFires when the user pastes some content in an element

Media Events

Events triggered by medias like videos, images and audio (applies to all HTML elements, but is most common in media elements, like <audio>, <embed>, <img>, <object>, and <video>).

Tip: Look at our HTML Audio and Video DOM Reference for more information.

AttributeValueDescription
onabortscriptScript to be run on abort
oncanplayscriptScript to be run when a file is ready to start playing (when it has buffered enough to begin)
oncanplaythroughscriptScript to be run when a file can be played all the way to the end without pausing for buffering
oncuechangescriptScript to be run when the cue changes in a <track> element
ondurationchangescriptScript to be run when the length of the media changes
onemptiedscriptScript to be run when something bad happens and the file is suddenly unavailable (like unexpectedly disconnects)
onendedscriptScript to be run when the media has reach the end (a useful event for messages like “thanks for listening”)
onerrorscriptScript to be run when an error occurs when the file is being loaded
onloadeddatascriptScript to be run when media data is loaded
onloadedmetadatascriptScript to be run when meta data (like dimensions and duration) are loaded
onloadstartscriptScript to be run just as the file begins to load before anything is actually loaded
onpausescriptScript to be run when the media is paused either by the user or programmatically
onplayscriptScript to be run when the media is ready to start playing
onplayingscriptScript to be run when the media actually has started playing
onprogressscriptScript to be run when the browser is in the process of getting the media data
onratechangescriptScript to be run each time the playback rate changes (like when a user switches to a slow motion or fast forward mode)
onseekedscriptScript to be run when the seeking attribute is set to false indicating that seeking has ended
onseekingscriptScript to be run when the seeking attribute is set to true indicating that seeking is active
onstalledscriptScript to be run when the browser is unable to fetch the media data for whatever reason
onsuspendscriptScript to be run when fetching the media data is stopped before it is completely loaded for whatever reason
ontimeupdatescriptScript to be run when the playing position has changed (like when the user fast forwards to a different point in the media)
onvolumechangescriptScript to be run each time the volume is changed which (includes setting the volume to “mute”)
onwaitingscriptScript to be run when the media has paused but is expected to resume (like when the media pauses to buffer more data)

Misc Events

AttributeValueDescription
ontogglescriptFires when the user opens or closes the <details> element

Color Names Supported by All Browsers

All modern browsers support the following 140 color names (click on a color name, or a hex value, to view the color as the background-color along with different text colors):

For a full overview of HTML colors, visit our colors tutorial.AliceBlue
#F0F8FFAntiqueWhite
#FAEBD7Aqua
#00FFFFAquamarine
#7FFFD4Azure
#F0FFFFBeige
#F5F5DCBisque
#FFE4C4Black
#000000BlanchedAlmond
#FFEBCDBlue
#0000FFBlueViolet
#8A2BE2Brown
#A52A2ABurlyWood
#DEB887CadetBlue
#5F9EA0Chartreuse
#7FFF00Chocolate
#D2691ECoral
#FF7F50CornflowerBlue
#6495EDCornsilk
#FFF8DCCrimson
#DC143CCyan
#00FFFFDarkBlue
#00008BDarkCyan
#008B8BDarkGoldenRod
#B8860BDarkGray
#A9A9A9DarkGrey
#A9A9A9DarkGreen
#006400DarkKhaki
#BDB76BDarkMagenta
#8B008BDarkOliveGreen
#556B2FDarkOrange
#FF8C00DarkOrchid
#9932CCDarkRed
#8B0000DarkSalmon
#E9967ADarkSeaGreen
#8FBC8FDarkSlateBlue
#483D8BDarkSlateGray
#2F4F4FDarkSlateGrey
#2F4F4FDarkTurquoise
#00CED1DarkViolet
#9400D3DeepPink
#FF1493DeepSkyBlue
#00BFFFDimGray
#696969DimGrey
#696969DodgerBlue
#1E90FFFireBrick
#B22222FloralWhite
#FFFAF0ForestGreen
#228B22Fuchsia
#FF00FFGainsboro
#DCDCDCGhostWhite
#F8F8FFGold
#FFD700GoldenRod
#DAA520Gray
#808080Grey
#808080Green
#008000GreenYellow
#ADFF2FHoneyDew
#F0FFF0HotPink
#FF69B4IndianRed
#CD5C5CIndigo
#4B0082Ivory
#FFFFF0Khaki
#F0E68CLavender
#E6E6FALavenderBlush
#FFF0F5LawnGreen
#7CFC00LemonChiffon
#FFFACDLightBlue
#ADD8E6LightCoral
#F08080LightCyan
#E0FFFFLightGoldenRodYellow
#FAFAD2LightGray
#D3D3D3LightGrey
#D3D3D3LightGreen
#90EE90LightPink
#FFB6C1LightSalmon
#FFA07ALightSeaGreen
#20B2AALightSkyBlue
#87CEFALightSlateGray
#778899LightSlateGrey
#778899LightSteelBlue
#B0C4DELightYellow
#FFFFE0Lime
#00FF00LimeGreen
#32CD32Linen
#FAF0E6Magenta
#FF00FFMaroon
#800000MediumAquaMarine
#66CDAAMediumBlue
#0000CDMediumOrchid
#BA55D3MediumPurple
#9370DBMediumSeaGreen
#3CB371MediumSlateBlue
#7B68EEMediumSpringGreen
#00FA9AMediumTurquoise
#48D1CCMediumVioletRed
#C71585MidnightBlue
#191970MintCream
#F5FFFAMistyRose
#FFE4E1Moccasin
#FFE4B5NavajoWhite
#FFDEADNavy
#000080OldLace
#FDF5E6Olive
#808000OliveDrab
#6B8E23Orange
#FFA500OrangeRed
#FF4500Orchid
#DA70D6PaleGoldenRod
#EEE8AAPaleGreen
#98FB98PaleTurquoise
#AFEEEEPaleVioletRed
#DB7093PapayaWhip
#FFEFD5PeachPuff
#FFDAB9Peru
#CD853FPink
#FFC0CBPlum
#DDA0DDPowderBlue
#B0E0E6Purple
#800080RebeccaPurple
#663399Red
#FF0000RosyBrown
#BC8F8FRoyalBlue
#4169E1SaddleBrown
#8B4513Salmon
#FA8072SandyBrown
#F4A460SeaGreen
#2E8B57SeaShell
#FFF5EESienna
#A0522DSilver
#C0C0C0SkyBlue
#87CEEBSlateBlue
#6A5ACDSlateGray
#708090SlateGrey
#708090Snow
#FFFAFASpringGreen
#00FF7FSteelBlue
#4682B4Tan
#D2B48CTeal
#008080Thistle
#D8BFD8Tomato
#FF6347Turquoise
#40E0D0Violet
#EE82EEWheat
#F5DEB3White
#FFFFFFWhiteSmoke
#F5F5F5Yellow
#FFFF00YellowGreen
#9ACD32

Color Names Supported by All Browsers
All modern browsers support the following 140 color names (click on a color name, or a hex value, to view the color as the background-color along with different text colors):
For a full overview of HTML colors, visit our colors tutorial.
AliceBlue
#F0F8FF


AntiqueWhite
#FAEBD7


Aqua
#00FFFF


Aquamarine
#7FFFD4


Azure
#F0FFFF


Beige
#F5F5DC


Bisque
#FFE4C4


Black
#000000


BlanchedAlmond
#FFEBCD


Blue
#0000FF


BlueViolet
#8A2BE2


Brown
#A52A2A


BurlyWood
#DEB887


CadetBlue
#5F9EA0


Chartreuse
#7FFF00


Chocolate
#D2691E


Coral
#FF7F50


CornflowerBlue
#6495ED


Cornsilk
#FFF8DC


Crimson
#DC143C


Cyan
#00FFFF


DarkBlue
#00008B


DarkCyan
#008B8B


DarkGoldenRod
#B8860B


DarkGray
#A9A9A9


DarkGrey
#A9A9A9


DarkGreen
#006400


DarkKhaki
#BDB76B


DarkMagenta
#8B008B


DarkOliveGreen
#556B2F


DarkOrange
#FF8C00


DarkOrchid
#9932CC


DarkRed
#8B0000


DarkSalmon
#E9967A


DarkSeaGreen
#8FBC8F


DarkSlateBlue
#483D8B


DarkSlateGray
#2F4F4F


DarkSlateGrey
#2F4F4F


DarkTurquoise
#00CED1


DarkViolet
#9400D3


DeepPink
#FF1493


DeepSkyBlue
#00BFFF


DimGray
#696969


DimGrey
#696969


DodgerBlue
#1E90FF


FireBrick
#B22222


FloralWhite
#FFFAF0


ForestGreen
#228B22


Fuchsia
#FF00FF


Gainsboro
#DCDCDC


GhostWhite
#F8F8FF


Gold
#FFD700


GoldenRod
#DAA520


Gray
#808080


Grey
#808080


Green
#008000


GreenYellow
#ADFF2F


HoneyDew
#F0FFF0


HotPink
#FF69B4


IndianRed
#CD5C5C


Indigo
#4B0082


Ivory
#FFFFF0


Khaki
#F0E68C


Lavender
#E6E6FA


LavenderBlush
#FFF0F5


LawnGreen
#7CFC00


LemonChiffon
#FFFACD


LightBlue
#ADD8E6


LightCoral
#F08080


LightCyan
#E0FFFF


LightGoldenRodYellow
#FAFAD2


LightGray
#D3D3D3


LightGrey
#D3D3D3


LightGreen
#90EE90


LightPink
#FFB6C1


LightSalmon
#FFA07A


LightSeaGreen
#20B2AA


LightSkyBlue
#87CEFA


LightSlateGray
#778899


LightSlateGrey
#778899


LightSteelBlue
#B0C4DE


LightYellow
#FFFFE0


Lime
#00FF00


LimeGreen
#32CD32


Linen
#FAF0E6


Magenta
#FF00FF


Maroon
#800000


MediumAquaMarine
#66CDAA


MediumBlue
#0000CD


MediumOrchid
#BA55D3


MediumPurple
#9370DB


MediumSeaGreen
#3CB371


MediumSlateBlue
#7B68EE


MediumSpringGreen
#00FA9A


MediumTurquoise
#48D1CC


MediumVioletRed
#C71585


MidnightBlue
#191970


MintCream
#F5FFFA


MistyRose
#FFE4E1


Moccasin
#FFE4B5


NavajoWhite
#FFDEAD


Navy
#000080


OldLace
#FDF5E6


Olive
#808000


OliveDrab
#6B8E23


Orange
#FFA500


OrangeRed
#FF4500


Orchid
#DA70D6


PaleGoldenRod
#EEE8AA


PaleGreen
#98FB98


PaleTurquoise
#AFEEEE


PaleVioletRed
#DB7093


PapayaWhip
#FFEFD5


PeachPuff
#FFDAB9


Peru
#CD853F


Pink
#FFC0CB


Plum
#DDA0DD


PowderBlue
#B0E0E6


Purple
#800080


RebeccaPurple
#663399


Red
#FF0000


RosyBrown
#BC8F8F


RoyalBlue
#4169E1


SaddleBrown
#8B4513


Salmon
#FA8072


SandyBrown
#F4A460


SeaGreen
#2E8B57


SeaShell
#FFF5EE


Sienna
#A0522D


Silver
#C0C0C0


SkyBlue
#87CEEB


SlateBlue
#6A5ACD


SlateGray
#708090


SlateGrey
#708090


Snow
#FFFAFA


SpringGreen
#00FF7F


SteelBlue
#4682B4


Tan
#D2B48C


Teal
#008080


Thistle
#D8BFD8


Tomato
#FF6347


Turquoise
#40E0D0


Violet
#EE82EE


Wheat
#F5DEB3


White
#FFFFFF


WhiteSmoke
#F5F5F5


Yellow
#FFFF00


YellowGreen
#9ACD32

HTML Canvas Reference

The HTML <canvas> tag is used to draw graphics, on the fly, via scripting (usually JavaScript).

To learn more about <canvas>, please read our HTML Canvas tutorial.


Colors, Styles, and Shadows

PropertyDescription
fillStyleSets or returns the color, gradient, or pattern used to fill the drawing
strokeStyleSets or returns the color, gradient, or pattern used for strokes
shadowColorSets or returns the color to use for shadows
shadowBlurSets or returns the blur level for shadows
shadowOffsetXSets or returns the horizontal distance of the shadow from the shape
shadowOffsetYSets or returns the vertical distance of the shadow from the shape
MethodDescription
createLinearGradient()Creates a linear gradient (to use on canvas content)
createPattern()Repeats a specified element in the specified direction
createRadialGradient()Creates a radial/circular gradient (to use on canvas content)
addColorStop()Specifies the colors and stop positions in a gradient object

Line Styles

PropertyDescription
lineCapSets or returns the style of the end caps for a line
lineJoinSets or returns the type of corner created, when two lines meet
lineWidthSets or returns the current line width
miterLimitSets or returns the maximum miter length


Rectangles

MethodDescription
rect()Creates a rectangle
fillRect()Draws a “filled” rectangle
strokeRect()Draws a rectangle (no fill)
clearRect()Clears the specified pixels within a given rectangle

Paths

MethodDescription
fill()Fills the current drawing (path)
stroke()Actually draws the path you have defined
beginPath()Begins a path, or resets the current path
moveTo()Moves the path to the specified point in the canvas, without creating a line
closePath()Creates a path from the current point back to the starting point
lineTo()Adds a new point and creates a line to that point from the last specified point in the canvas
clip()Clips a region of any shape and size from the original canvas
quadraticCurveTo()Creates a quadratic Bézier curve
bezierCurveTo()Creates a cubic Bézier curve
arc()Creates an arc/curve (used to create circles, or parts of circles)
arcTo()Creates an arc/curve between two tangents
isPointInPath()Returns true if the specified point is in the current path, otherwise false

Transformations

MethodDescription
scale()Scales the current drawing bigger or smaller
rotate()Rotates the current drawing
translate()Remaps the (0,0) position on the canvas
transform()Replaces the current transformation matrix for the drawing
setTransform()Resets the current transform to the identity matrix. Then runs transform()

Text

PropertyDescription
fontSets or returns the current font properties for text content
textAlignSets or returns the current alignment for text content
textBaselineSets or returns the current text baseline used when drawing text
MethodDescription
fillText()Draws “filled” text on the canvas
strokeText()Draws text on the canvas (no fill)
measureText()Returns an object that contains the width of the specified text

Image Drawing

MethodDescription
drawImage()Draws an image, canvas, or video onto the canvas

Pixel Manipulation

PropertyDescription
widthReturns the width of an ImageData object
heightReturns the height of an ImageData object
dataReturns an object that contains image data of a specified ImageData object
MethodDescription
createImageData()Creates a new, blank ImageData object
getImageData()Returns an ImageData object that copies the pixel data for the specified rectangle on a canvas
putImageData()Puts the image data (from a specified ImageData object) back onto the canvas

Compositing

PropertyDescription
globalAlphaSets or returns the current alpha or transparency value of the drawing
globalCompositeOperationSets or returns how a new image is drawn onto an existing image

Other

MethodDescription
save()Saves the state of the current context
restore()Returns previously saved path state and attributes
createEvent() 
getContext() 
toDataURL() 

HTML Audio and Video DOM Reference

The HTML5 DOM has methods, properties, and events for the <audio> and <video> elements.


HTML Audio/Video Methods

MethodDescription
addTextTrack()Adds a new text track to the audio/video
canPlayType()Checks if the browser can play the specified audio/video type
load()Re-loads the audio/video element
play()Starts playing the audio/video
pause()Pauses the currently playing audio/video

HTML Audio/Video Properties

PropertyDescription
audioTracksReturns an AudioTrackList object representing available audio tracks
autoplaySets or returns whether the audio/video should start playing as soon as it is loaded
bufferedReturns a TimeRanges object representing the buffered parts of the audio/video
controllerReturns the MediaController object representing the current media controller of the audio/video
controlsSets or returns whether the audio/video should display controls (like play/pause etc.)
crossOriginSets or returns the CORS settings of the audio/video
currentSrcReturns the URL of the current audio/video
currentTimeSets or returns the current playback position in the audio/video (in seconds)
defaultMutedSets or returns whether the audio/video should be muted by default
defaultPlaybackRateSets or returns the default speed of the audio/video playback
durationReturns the length of the current audio/video (in seconds)
endedReturns whether the playback of the audio/video has ended or not
errorReturns a MediaError object representing the error state of the audio/video
loopSets or returns whether the audio/video should start over again when finished
mediaGroupSets or returns the group the audio/video belongs to (used to link multiple audio/video elements)
mutedSets or returns whether the audio/video is muted or not
networkStateReturns the current network state of the audio/video
pausedReturns whether the audio/video is paused or not
playbackRateSets or returns the speed of the audio/video playback
playedReturns a TimeRanges object representing the played parts of the audio/video
preloadSets or returns whether the audio/video should be loaded when the page loads
readyStateReturns the current ready state of the audio/video
seekableReturns a TimeRanges object representing the seekable parts of the audio/video
seekingReturns whether the user is currently seeking in the audio/video
srcSets or returns the current source of the audio/video element
startDateReturns a Date object representing the current time offset
textTracksReturns a TextTrackList object representing the available text tracks
videoTracksReturns a VideoTrackList object representing the available video tracks
volumeSets or returns the volume of the audio/video


HTML Audio/Video Events

EventDescription
abortFires when the loading of an audio/video is aborted
canplayFires when the browser can start playing the audio/video
canplaythroughFires when the browser can play through the audio/video without stopping for buffering
durationchangeFires when the duration of the audio/video is changed
emptiedFires when the current playlist is empty
endedFires when the current playlist is ended
errorFires when an error occurred during the loading of an audio/video
loadeddataFires when the browser has loaded the current frame of the audio/video
loadedmetadataFires when the browser has loaded meta data for the audio/video
loadstartFires when the browser starts looking for the audio/video
pauseFires when the audio/video has been paused
playFires when the audio/video has been started or is no longer paused
playingFires when the audio/video is playing after having been paused or stopped for buffering
progressFires when the browser is downloading the audio/video
ratechangeFires when the playing speed of the audio/video is changed
seekedFires when the user is finished moving/skipping to a new position in the audio/video
seekingFires when the user starts moving/skipping to a new position in the audio/video
stalledFires when the browser is trying to get media data, but data is not available
suspendFires when the browser is intentionally not getting media data
timeupdateFires when the current playback position has changed
volumechangeFires when the volume has been changed
waitingFires when the video stops because it needs to buffer the next frame

Common HTML Character Sets

The default character set in HTML5 is UTF-8.

For a closer look, visit our Complete HTML Character Set Reference.

NumberASCIIANSI8859-1UTF-8Description
32space
33!!!!exclamation mark
34quotation mark
35####number sign
36$$$$dollar sign
37%%%%percent sign
38&&&&ampersand
39apostrophe
40((((left parenthesis
41))))right parenthesis
42****asterisk
43++++plus sign
44,,,,comma
45hyphen-minus
46....full stop
47////solidus
480000digit zero
491111digit one
502222digit two
513333digit three
524444digit four
535555digit five
546666digit six
557777digit seven
568888digit eight
579999digit nine
58::::colon
59;;;;semicolon
60<<<<less-than sign
61====equals sign
62>>>>greater-than sign
63????question mark
64@@@@commercial at
65AAAALatin capital letter A
66BBBBLatin capital letter B
67CCCCLatin capital letter C
68DDDDLatin capital letter D
69EEEELatin capital letter E
70FFFFLatin capital letter F
71GGGGLatin capital letter G
72HHHHLatin capital letter H
73IIIILatin capital letter I
74JJJJLatin capital letter J
75KKKKLatin capital letter K
76LLLLLatin capital letter L
77MMMMLatin capital letter M
78NNNNLatin capital letter N
79OOOOLatin capital letter O
80PPPPLatin capital letter P
81QQQQLatin capital letter Q
82RRRRLatin capital letter R
83SSSSLatin capital letter S
84TTTTLatin capital letter T
85UUUULatin capital letter U
86VVVVLatin capital letter V
87WWWWLatin capital letter W
88XXXXLatin capital letter X
89YYYYLatin capital letter Y
90ZZZZLatin capital letter Z
91[[[[left square bracket
92\\\\reverse solidus
93]]]]right square bracket
94^^^^circumflex accent
95____low line
96````grave accent
97aaaaLatin small letter a
98bbbbLatin small letter b
99ccccLatin small letter c
100ddddLatin small letter d
101eeeeLatin small letter e
102ffffLatin small letter f
103ggggLatin small letter g
104hhhhLatin small letter h
105iiiiLatin small letter i
106jjjjLatin small letter j
107kkkkLatin small letter k
108llllLatin small letter l
109mmmmLatin small letter m
110nnnnLatin small letter n
111ooooLatin small letter o
112ppppLatin small letter p
113qqqqLatin small letter q
114rrrrLatin small letter r
115ssssLatin small letter s
116ttttLatin small letter t
117uuuuLatin small letter u
118vvvvLatin small letter v
119wwwwLatin small letter w
120xxxxLatin small letter x
121yyyyLatin small letter y
122zzzzLatin small letter z
123{{{{left curly bracket
124||||vertical line
125}}}}right curly bracket
126~~~~tilde
127DEL    
128   euro sign
129 NOT USED
130   single low-9 quotation mark
131 ƒ  Latin small letter f with hook
132   double low-9 quotation mark
133   horizontal ellipsis
134   dagger
135   double dagger
136 ˆ  modifier letter circumflex accent
137   per mille sign
138 Š  Latin capital letter S with caron
139   single left-pointing angle quotation mark
140 Œ  Latin capital ligature OE
141 NOT USED
142 Ž  Latin capital letter Z with caron
143 NOT USED
144 NOT USED
145   left single quotation mark
146   right single quotation mark
147   left double quotation mark
148   right double quotation mark
149   bullet
150   en dash
151   em dash
152 ˜  small tilde
153   trade mark sign
154 š  Latin small letter s with caron
155   single right-pointing angle quotation mark
156 œ  Latin small ligature oe
157 NOT USED
158 ž  Latin small letter z with caron
159 Ÿ  Latin capital letter Y with diaeresis
160    no-break space
161 ¡¡¡inverted exclamation mark
162 ¢¢¢cent sign
163 £££pound sign
164 ¤¤¤currency sign
165 ¥¥¥yen sign
166 ¦¦¦broken bar
167 §§§section sign
168 ¨¨¨diaeresis
169 ©©©copyright sign
170 ªªªfeminine ordinal indicator
171 «««left-pointing double angle quotation mark
172 ¬¬¬not sign
173 ­­­soft hyphen
174 ®®®registered sign
175 ¯¯¯macron
176 °°°degree sign
177 ±±±plus-minus sign
178 ²²²superscript two
179 ³³³superscript three
180 ´´´acute accent
181 µµµmicro sign
182 pilcrow sign
183 ···middle dot
184 ¸¸¸cedilla
185 ¹¹¹superscript one
186 ºººmasculine ordinal indicator
187 »»»right-pointing double angle quotation mark
188 ¼¼¼vulgar fraction one quarter
189 ½½½vulgar fraction one half
190 ¾¾¾vulgar fraction three quarters
191 ¿¿¿inverted question mark
192 ÀÀÀLatin capital letter A with grave
193 ÁÁÁLatin capital letter A with acute
194 ÂÂÂLatin capital letter A with circumflex
195 ÃÃÃLatin capital letter A with tilde
196 ÄÄÄLatin capital letter A with diaeresis
197 ÅÅÅLatin capital letter A with ring above
198 ÆÆÆLatin capital letter AE
199 ÇÇÇLatin capital letter C with cedilla
200 ÈÈÈLatin capital letter E with grave
201 ÉÉÉLatin capital letter E with acute
202 ÊÊÊLatin capital letter E with circumflex
203 ËËËLatin capital letter E with diaeresis
204 ÌÌÌLatin capital letter I with grave
205 ÍÍÍLatin capital letter I with acute
206 ÎÎÎLatin capital letter I with circumflex
207 ÏÏÏLatin capital letter I with diaeresis
208 ÐÐÐLatin capital letter Eth
209 ÑÑÑLatin capital letter N with tilde
210 ÒÒÒLatin capital letter O with grave
211 ÓÓÓLatin capital letter O with acute
212 ÔÔÔLatin capital letter O with circumflex
213 ÕÕÕLatin capital letter O with tilde
214 ÖÖÖLatin capital letter O with diaeresis
215 ×××multiplication sign
216 ØØØLatin capital letter O with stroke
217 ÙÙÙLatin capital letter U with grave
218 ÚÚÚLatin capital letter U with acute
219 ÛÛÛLatin capital letter U with circumflex
220 ÜÜÜLatin capital letter U with diaeresis
221 ÝÝÝLatin capital letter Y with acute
222 ÞÞÞLatin capital letter Thorn
223 ßßßLatin small letter sharp s
224 àààLatin small letter a with grave
225 áááLatin small letter a with acute
226 âââLatin small letter a with circumflex
227 ãããLatin small letter a with tilde
228 äääLatin small letter a with diaeresis
229 åååLatin small letter a with ring above
230 æææLatin small letter ae
231 çççLatin small letter c with cedilla
232 èèèLatin small letter e with grave
233 éééLatin small letter e with acute
234 êêêLatin small letter e with circumflex
235 ëëëLatin small letter e with diaeresis
236 ìììLatin small letter i with grave
237 íííLatin small letter i with acute
238 îîîLatin small letter i with circumflex
239 ïïïLatin small letter i with diaeresis
240 ðððLatin small letter eth
241 ñññLatin small letter n with tilde
242 òòòLatin small letter o with grave
243 óóóLatin small letter o with acute
244 ôôôLatin small letter o with circumflex
245 õõõLatin small letter o with tilde
246 öööLatin small letter o with diaeresis
247 ÷÷÷division sign
248 øøøLatin small letter o with stroke
249 ùùùLatin small letter u with grave
250 úúúLatin small letter u with acute
251 ûûûLatin small letter with circumflex
252 üüüLatin small letter u with diaeresis
253 ýýýLatin small letter y with acute
254 þþþLatin small letter thorn
255 ÿÿÿLatin small letter y with diaeresis

The HTML Document Type

All HTML documents must start with a <!DOCTYPE> declaration.

The declaration is not an HTML tag. It is an “information” to the browser about what document type to expect.

In HTML5, the <!DOCTYPE> declaration is simple:<!DOCTYPE html>

In older documents (HTML 4 or XHTML), the declaration is more complicated because the declaration must refer to a DTD (Document Type Definition).<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”><!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN” “http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”>

You can read more about document types in the <!DOCTYPE> reference.


Valid HTML Elements in Different DOCTYPES

TagHTML 5HTML 4XHTML
<a>YesYesYes
<abbr>YesYesYes
<acronym>NoYesYes
<address>YesYesYes
<applet>NoYesNo
<area>YesYesNo
<article>YesNoNo
<aside>YesNoNo
<audio>YesNoNo
<b>YesYesYes
<base>YesYesYes
<basefont>NoYesNo
<bdi>YesNoNo
<bdo>YesYesNo
<big>NoYesYes
<blockquote>YesYesYes
<body>YesYesYes
<br>YesYesYes
<button>YesYesYes
<canvas>YesNoNo
<caption>YesYesYes
<center>NoYesNo
<cite>YesYesYes
<code>YesYesYes
<col>YesYesNo
<colgroup>YesYesNo
<datalist>YesNoNo
<dd>YesYesYes
<del>YesYesNo
<details>YesNoNo
<dfn>YesYesYes
<dialog>YesNoNo
<dir>NoYesNo
<div>YesYesYes
<dl>YesYesYes
<dt>YesYesYes
<em>YesYesYes
<embed>YesNoNo
<fieldset>YesYesYes
<figcaption>YesNoNo
<figure>YesNoNo
<font>NoYesNo
<footer>YesNoNo
<form>YesYesYes
<frame>NoNoNo
<frameset>NoYesNo
<h1> to <h6>YesYesYes
<head>YesYesYes
<header>YesNoNo
<hr>YesYesYes
<html>YesYesYes
<i>YesYesYes
<iframe>YesYesNo
<img>YesYesYes
<input>YesYesYes
<ins>YesYesNo
<kbd>YesYesYes
<label>YesYesYes
<legend>YesYesYes
<li>YesYesYes
<link>YesYesYes
<main>YesNoNo
<map>YesYesNo
<mark>YesNoNo
<meta>YesYesYes
<meter>YesNoNo
<nav>YesNoNo
<noframes>NoYesNo
<noscript>YesYesYes
<object>YesYesYes
<ol>YesYesYes
<optgroup>YesYesYes
<option>YesYesYes
<output>YesNoNo
<p>YesYesYes
<param>YesYesYes
<pre>YesYesYes
<progress>YesNoNo
<q>YesYesYes
<rp>YesNoNo
<rt>YesNoNo
<ruby>YesNoNo
<s>YesYesNo
<samp>YesYesYes
<script>YesYesYes
<section>YesNoNo
<select>YesYesYes
<small>YesYesYes
<source>YesNoNo
<span>YesYesYes
<strike>NoYesNo
<strong>YesYesYes
<style>YesYesYes
<sub>YesYesYes
<summary>YesNoNo
<sup>YesYesYes
<table>YesYesYes
<tbody>YesYesNo
<td>YesYesYes
<textarea>YesYesYes
<tfoot>YesYesNo
<th>YesYesYes
<thead>YesYesNo
<time>YesNoNo
<title>YesYesYes
<tr>YesYesYes
<track>YesNoNo
<tt>NoYesYes
<u>YesYesNo
<ul>YesYesYes
<var>YesYesYes
<video>YesNoNo
<wbr>YesNoNo

URL – Uniform Resource Locator

Web browsers request pages from web servers by using a URL.

The URL is the address of a web page, like: https://www.w3schools.com.


URL Encoding (Percent Encoding)

URL encoding converts characters into a format that can be transmitted over the Internet.

URLs can only be sent over the Internet using the ASCII character-set.

Since URLs often contain characters outside the ASCII set, the URL has to be converted into a valid ASCII format.

URL encoding replaces unsafe ASCII characters with a “%” followed by two hexadecimal digits.

URLs cannot contain spaces. URL encoding normally replaces a space with a plus (+) sign or with %20.


Try It Yourself

If you click the “Submit” button below, the browser will URL encode the input before it is sent to the server. A page at the server will display the received input.

Try some other input and click Submit again.


URL Encoding Functions

In JavaScript, PHP, and ASP there are functions that can be used to URL encode a string.

PHP has the rawurlencode() function, and ASP has the Server.URLEncode() function.

In JavaScript you can use the encodeURIComponent() function.

Click the “URL Encode” button to see how the JavaScript function encodes the text.

Note: The JavaScript function encodes space as %20.



ASCII Encoding Reference

Your browser will encode input, according to the character-set used in your page.

The default character-set in HTML5 is UTF-8.

CharacterFrom Windows-1252From UTF-8
space%20%20
!%21%21
%22%22
#%23%23
$%24%24
%%25%25
&%26%26
%27%27
(%28%28
)%29%29
*%2A%2A
+%2B%2B
,%2C%2C
%2D%2D
.%2E%2E
/%2F%2F
0%30%30
1%31%31
2%32%32
3%33%33
4%34%34
5%35%35
6%36%36
7%37%37
8%38%38
9%39%39
:%3A%3A
;%3B%3B
<%3C%3C
=%3D%3D
>%3E%3E
?%3F%3F
@%40%40
A%41%41
B%42%42
C%43%43
D%44%44
E%45%45
F%46%46
G%47%47
H%48%48
I%49%49
J%4A%4A
K%4B%4B
L%4C%4C
M%4D%4D
N%4E%4E
O%4F%4F
P%50%50
Q%51%51
R%52%52
S%53%53
T%54%54
U%55%55
V%56%56
W%57%57
X%58%58
Y%59%59
Z%5A%5A
[%5B%5B
\%5C%5C
]%5D%5D
^%5E%5E
_%5F%5F
`%60%60
a%61%61
b%62%62
c%63%63
d%64%64
e%65%65
f%66%66
g%67%67
h%68%68
i%69%69
j%6A%6A
k%6B%6B
l%6C%6C
m%6D%6D
n%6E%6E
o%6F%6F
p%70%70
q%71%71
r%72%72
s%73%73
t%74%74
u%75%75
v%76%76
w%77%77
x%78%78
y%79%79
z%7A%7A
{%7B%7B
|%7C%7C
}%7D%7D
~%7E%7E
 %7F%7F
`%80%E2%82%AC
%81%81
%82%E2%80%9A
ƒ%83%C6%92
%84%E2%80%9E
%85%E2%80%A6
%86%E2%80%A0
%87%E2%80%A1
ˆ%88%CB%86
%89%E2%80%B0
Š%8A%C5%A0
%8B%E2%80%B9
Œ%8C%C5%92
%8D%C5%8D
Ž%8E%C5%BD
%8F%8F
%90%C2%90
%91%E2%80%98
%92%E2%80%99
%93%E2%80%9C
%94%E2%80%9D
%95%E2%80%A2
%96%E2%80%93
%97%E2%80%94
˜%98%CB%9C
%99%E2%84
š%9A%C5%A1
%9B%E2%80
œ%9C%C5%93
%9D%9D
ž%9E%C5%BE
Ÿ%9F%C5%B8
 %A0%C2%A0
¡%A1%C2%A1
¢%A2%C2%A2
£%A3%C2%A3
¤%A4%C2%A4
¥%A5%C2%A5
¦%A6%C2%A6
§%A7%C2%A7
¨%A8%C2%A8
©%A9%C2%A9
ª%AA%C2%AA
«%AB%C2%AB
¬%AC%C2%AC
­%AD%C2%AD
®%AE%C2%AE
¯%AF%C2%AF
°%B0%C2%B0
±%B1%C2%B1
²%B2%C2%B2
³%B3%C2%B3
´%B4%C2%B4
µ%B5%C2%B5
%B6%C2%B6
·%B7%C2%B7
¸%B8%C2%B8
¹%B9%C2%B9
º%BA%C2%BA
»%BB%C2%BB
¼%BC%C2%BC
½%BD%C2%BD
¾%BE%C2%BE
¿%BF%C2%BF
À%C0%C3%80
Á%C1%C3%81
Â%C2%C3%82
Ã%C3%C3%83
Ä%C4%C3%84
Å%C5%C3%85
Æ%C6%C3%86
Ç%C7%C3%87
È%C8%C3%88
É%C9%C3%89
Ê%CA%C3%8A
Ë%CB%C3%8B
Ì%CC%C3%8C
Í%CD%C3%8D
Î%CE%C3%8E
Ï%CF%C3%8F
Ð%D0%C3%90
Ñ%D1%C3%91
Ò%D2%C3%92
Ó%D3%C3%93
Ô%D4%C3%94
Õ%D5%C3%95
Ö%D6%C3%96
×%D7%C3%97
Ø%D8%C3%98
Ù%D9%C3%99
Ú%DA%C3%9A
Û%DB%C3%9B
Ü%DC%C3%9C
Ý%DD%C3%9D
Þ%DE%C3%9E
ß%DF%C3%9F
à%E0%C3%A0
á%E1%C3%A1
â%E2%C3%A2
ã%E3%C3%A3
ä%E4%C3%A4
å%E5%C3%A5
æ%E6%C3%A6
ç%E7%C3%A7
è%E8%C3%A8
é%E9%C3%A9
ê%EA%C3%AA
ë%EB%C3%AB
ì%EC%C3%AC
í%ED%C3%AD
î%EE%C3%AE
ï%EF%C3%AF
ð%F0%C3%B0
ñ%F1%C3%B1
ò%F2%C3%B2
ó%F3%C3%B3
ô%F4%C3%B4
õ%F5%C3%B5
ö%F6%C3%B6
÷%F7%C3%B7
ø%F8%C3%B8
ù%F9%C3%B9
ú%FA%C3%BA
û%FB%C3%BB
ü%FC%C3%BC
ý%FD%C3%BD
þ%FE%C3%BE
ÿ%FF%C3%BF

URL Encoding Reference

The ASCII control characters %00-%1F were originally designed to control hardware devices.

Control characters have nothing to do inside a URL.

ASCII CharacterDescriptionURL-encoding
NULnull character%00
SOHstart of header%01
STXstart of text%02
ETXend of text%03
EOTend of transmission%04
ENQenquiry%05
ACKacknowledge%06
BELbell (ring)%07
BSbackspace%08
HThorizontal tab%09
LFline feed%0A
VTvertical tab%0B
FFform feed%0C
CRcarriage return%0D
SOshift out%0E
SIshift in%0F
DLEdata link escape%10
DC1device control 1%11
DC2device control 2%12
DC3device control 3%13
DC4device control 4%14
NAKnegative acknowledge%15
SYNsynchronize%16
ETBend transmission block%17
CANcancel%18
EMend of medium%19
SUBsubstitute%1A
ESCescape%1B
FSfile separator%1C
GSgroup separator%1D
RSrecord separator%1E
USunit separator%1F

ISO Language Codes

You should always include the lang attribute inside the <html> tag, to declare the language of the Web page. This is meant to assist search engines and browsers:<html lang=”en”>

</html>

In XHTML, the language is declared inside the <html> tag as follows:<html xmlns=”http://www.w3.org/1999/xhtml” lang=”en” xml:lang=”en”>

</html>


ISO 639-1 Language Codes

ISO 639-1 defines abbreviations for languages:

See also: Reference for Country Codes.

LanguageISO Code
Abkhazianab
Afaraa
Afrikaansaf
Akanak
Albaniansq
Amharicam
Arabicar
Aragonesean
Armenianhy
Assameseas
Avaricav
Avestanae
Aymaraay
Azerbaijaniaz
Bambarabm
Bashkirba
Basqueeu
Belarusianbe
Bengali (Bangla)bn
Biharibh
Bislamabi
Bosnianbs
Bretonbr
Bulgarianbg
Burmesemy
Catalanca
Chamorroch
Chechence
Chichewa, Chewa, Nyanjany
Chinesezh
Chinese (Simplified)zh-Hans
Chinese (Traditional)zh-Hant
Chuvashcv
Cornishkw
Corsicanco
Creecr
Croatianhr
Czechcs
Danishda
Divehi, Dhivehi, Maldiviandv
Dutchnl
Dzongkhadz
Englishen
Esperantoeo
Estonianet
Eweee
Faroesefo
Fijianfj
Finnishfi
Frenchfr
Fula, Fulah, Pulaar, Pularff
Galiciangl
Gaelic (Scottish)gd
Gaelic (Manx)gv
Georgianka
Germande
Greekel
Greenlandickl
Guaranign
Gujaratigu
Haitian Creoleht
Hausaha
Hebrewhe
Hererohz
Hindihi
Hiri Motuho
Hungarianhu
Icelandicis
Idoio
Igboig
Indonesianid, in
Interlinguaia
Interlingueie
Inuktitutiu
Inupiakik
Irishga
Italianit
Japaneseja
Javanesejv
Kalaallisut, Greenlandickl
Kannadakn
Kanurikr
Kashmiriks
Kazakhkk
Khmerkm
Kikuyuki
Kinyarwanda (Rwanda)rw
Kirundirn
Kyrgyzky
Komikv
Kongokg
Koreanko
Kurdishku
Kwanyamakj
Laolo
Latinla
Latvian (Lettish)lv
Limburgish ( Limburger)li
Lingalaln
Lithuanianlt
Luga-Katangalu
Luganda, Gandalg
Luxembourgishlb
Manxgv
Macedonianmk
Malagasymg
Malayms
Malayalamml
Maltesemt
Maorimi
Marathimr
Marshallesemh
Moldavianmo
Mongolianmn
Nauruna
Navajonv
Ndongang
Northern Ndebelend
Nepaline
Norwegianno
Norwegian bokmålnb
Norwegian nynorsknn
Nuosuii
Occitanoc
Ojibweoj
Old Church Slavonic, Old Bulgariancu
Oriyaor
Oromo (Afaan Oromo)om
Ossetianos
Pālipi
Pashto, Pushtops
Persian (Farsi)fa
Polishpl
Portuguesept
Punjabi (Eastern)pa
Quechuaqu
Romanshrm
Romanianro
Russianru
Samise
Samoansm
Sangosg
Sanskritsa
Serbiansr
Serbo-Croatiansh
Sesothost
Setswanatn
Shonasn
Sichuan Yiii
Sindhisd
Sinhalesesi
Siswatiss
Slovaksk
Sloveniansl
Somaliso
Southern Ndebelenr
Spanishes
Sundanesesu
Swahili (Kiswahili)sw
Swatiss
Swedishsv
Tagalogtl
Tahitianty
Tajiktg
Tamilta
Tatartt
Telugute
Thaith
Tibetanbo
Tigrinyati
Tongato
Tsongats
Turkishtr
Turkmentk
Twitw
Uyghurug
Ukrainianuk
Urduur
Uzbekuz
Vendave
Vietnamesevi
Volapükvo
Wallonwa
Welshcy
Wolofwo
Western Frisianfy
Xhosaxh
Yiddishyi, ji
Yorubayo
Zhuang, Chuangza
Zuluzu

ISO Country Codes

In HTML, country codes can be used as an addition to the language code in the lang attribute.

The first two characters of a language code defines the language of the Web page (See Language Code Reference).

The last two characters define the country.

The following example specifies English as language and United States as country:<html lang=”en-US”>

</html>


ISO Country Codes

CountryISO Code
AFGHANISTANAF
ALBANIAAL
ALGERIADZ
AMERICAN SAMOAAS
ANDORRAAD
ANGOLAAO
ANTARCTICAAQ
ANTIGUA AND BARBUDAAG
ARGENTINAAR
ARMENIAAM
ARUBAAW
AUSTRALIAAU
AUSTRIAAT
AZERBAIJANAZ
BAHAMASBS
BAHRAINBH
BANGLADESHBD
BARBADOSBB
BELARUSBY
BELGIUMBE
BELIZEBZ
BENINBJ
BERMUDABM
BHUTANBT
BOLIVIABO
BOSNIA AND HERZEGOVINABA
BOTSWANABW
BOUVET ISLANDBV
BRAZILBR
BRITISH INDIAN OCEAN TERRITORYIO
BRUNEI DARUSSALAMBN
BULGARIABG
BURKINA FASOBF
BURUNDIBI
CAMBODIAKH
CAMEROONCM
CANADACA
CAPE VERDECV
CAYMAN ISLANDSKY
CENTRAL AFRICAN REPUBLICCF
CHADTD
CHILECL
CHINACN
CHRISTMAS ISLANDCX
COCOS (KEELING) ISLANDSCC
COLOMBIACO
COMOROSKM
CONGOCG
CONGO, THE DEMOCRATIC REPUBLIC OF THECD
COOK ISLANDSCK
COSTA RICACR
CÔTE D’IVOIRECI
CROATIAHR
CUBACU
CYPRUSCY
CZECH REPUBLICCZ
DENMARKDK
DJIBOUTIDJ
DOMINICADM
DOMINICAN REPUBLICDO
ECUADOREC
EGYPTEG
EL SALVADORSV
EQUATORIAL GUINEAGQ
ERITREAER
ESTONIAEE
ETHIOPIAET
FALKLAND ISLANDS (MALVINAS)FK
FAROE ISLANDSFO
FIJIFJ
FINLANDFI
FRANCEFR
FRENCH GUIANAGF
FRENCH POLYNESIAPF
FRENCH SOUTHERN TERRITORIESTF
GABONGA
GAMBIAGM
GEORGIAGE
GERMANYDE
GHANAGH
GIBRALTARGI
GREECEGR
GREENLANDGL
GRENADAGD
GUADELOUPEGP
GUAMGU
GUATEMALAGT
GUINEAGN
GUINEA-BISSAUGW
GUYANAGY
HAITIHT
HEARD ISLAND AND MCDONALD ISLANDSHM
HONDURASHN
HONG KONGHK
HUNGARYHU
ICELANDIS
INDIAIN
INDONESIAID
IRAN, ISLAMIC REPUBLIC OFIR
IRAQIQ
IRELANDIE
ISRAELIL
ITALYIT
JAMAICAJM
JAPANJP
JORDANJO
KAZAKHSTANKZ
KENYAKE
KIRIBATIKI
KOREA, DEMOCRATIC PEOPLE’S REPUBLIC OFKP
KOREA, REPUBLIC OFKR
KUWAITKW
KYRGYZSTANKG
LAO PEOPLE’S DEMOCRATIC REPUBLIC (LAOS)LA
LATVIALV
LEBANONLB
LESOTHOLS
LIBERIALR
LIBYA, STATE OFLY
LIECHTENSTEINLI
LITHUANIALT
LUXEMBOURGLU
MACAOMO
MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OFMK
MADAGASCARMG
MALAWIMW
MALAYSIAMY
MALDIVESMV
MALIML
MALTAMT
MARSHALL ISLANDSMH
MARTINIQUEMQ
MAURITANIAMR
MAURITIUSMU
MAYOTTEYT
MEXICOMX
MICRONESIA, FEDERATED STATES OFFM
MOLDOVA, REPUBLIC OFMD
MONACOMC
MONGOLIAMN
MONTENEGROME
MONTSERRATMS
MOROCCOMA
MOZAMBIQUEMZ
MYANMARMM
NAMIBIANA
NAURUNR
NEPAL, FEDERAL DEMOCRATIC REPUBLIC OFNP
NETHERLANDSNL
NETHERLANDS ANTILLESAN
NEW CALEDONIANC
NEW ZEALANDNZ
NICARAGUANI
NIGERNE
NIGERIANG
NIUENU
NORFOLK ISLANDNF
NORTHERN MARIANA ISLANDSMP
NORWAYNO
OMANOM
PAKISTANPK
PALAUPW
PALESTINE, STATE OFPS
PANAMAPA
PAPUA NEW GUINEAPG
PARAGUAYPY
PERUPE
PHILIPPINESPH
PITCAIRNPN
POLANDPL
PORTUGALPT
PUERTO RICOPR
QATARQA
RÉUNIONRE
ROMANIARO
RUSSIAN FEDERATIONRU
RWANDARW
SAINT HELENASH
SAINT KITTS AND NEVISKN
SAINT LUCIALC
SAINT PIERRE AND MIQUELONPM
SAINT VINCENT AND THE GRENADINESVC
SAMOAWS
SAN MARINOSM
SAO TOME AND PRINCIPEST
SAUDI ARABIASA
SENEGALSN
SERBIARS
SEYCHELLESSC
SIERRA LEONESL
SINGAPORESG
SLOVAKIASK
SLOVENIASI
SOLOMON ISLANDSSB
SOMALIASO
SOUTH AFRICAZA
SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDSGS
SOUTH SUDANSS
SPAINES
SRI LANKALK
SUDANSD
SURINAMESR
SVALBARD AND JAN MAYENSJ
SWAZILANDSZ
SWEDENSE
SWITZERLANDCH
SYRIAN ARAB REPUBLICSY
TAIWANTW
TAJIKISTANTJ
TANZANIA, UNITED REPUBLIC OFTZ
THAILANDTH
TIMOR-LESTETL
TOGOTG
TOKELAUTK
TONGATO
TRINIDAD AND TOBAGOTT
TUNISIATN
TURKEYTR
TURKMENISTANTM
TURKS AND CAICOS ISLANDSTC
TUVALUTV
UGANDAUG
UKRAINEUA
UNITED ARAB EMIRATESAE
UNITED KINGDOMGB
UNITED STATESUS
UNITED STATES MINOR OUTLYING ISLANDSUM
URUGUAYUY
UZBEKISTANUZ
VANUATUVU
VENEZUELAVE
VIET NAMVN
VIRGIN ISLANDS, BRITISHVG
VIRGIN ISLANDS, U.S.VI
WALLIS AND FUTUNAWF
WESTERN SAHARAEH
YEMENYE
ZAMBIAZM
ZIMBABWEZW

HTML Error Messages

When a browser requests a service from a web server, an error might occur, and the server might return an error code like “404 Not Found”.

It is common to name these errors HTML error messages.

But these messages are something called HTTP status messages. In fact, the server always returns a message for every request. The most common message is 200 OK.

Below is a list of HTTP status messages that might be returned:

1xx: Information

Message:Description:
100 ContinueThe server has received the request headers, and the client should proceed to send the request body
101 Switching ProtocolsThe requester has asked the server to switch protocols
103 CheckpointUsed in the resumable requests proposal to resume aborted PUT or POST requests

2xx: Successful

Message:Description:
200 OKThe request is OK (this is the standard response for successful HTTP requests)
201 CreatedThe request has been fulfilled, and a new resource is created 
202 AcceptedThe request has been accepted for processing, but the processing has not been completed
203 Non-Authoritative InformationThe request has been successfully processed, but is returning information that may be from another source
204 No ContentThe request has been successfully processed, but is not returning any content
205 Reset ContentThe request has been successfully processed, but is not returning any content, and requires that the requester reset the document view
206 Partial ContentThe server is delivering only part of the resource due to a range header sent by the client

3xx: Redirection

Message:Description:
300 Multiple ChoicesA link list. The user can select a link and go to that location. Maximum five addresses  
301 Moved PermanentlyThe requested page has moved to a new URL 
302 FoundThe requested page has moved temporarily to a new URL 
303 See OtherThe requested page can be found under a different URL
304 Not ModifiedIndicates the requested page has not been modified since last requested
306 Switch ProxyNo longer used
307 Temporary RedirectThe requested page has moved temporarily to a new URL
308 Resume IncompleteUsed in the resumable requests proposal to resume aborted PUT or POST requests


4xx: Client Error

Message:Description:
400 Bad RequestThe request cannot be fulfilled due to bad syntax
401 UnauthorizedThe request was a legal request, but the server is refusing to respond to it. For use when authentication is possible but has failed or not yet been provided
402 Payment RequiredReserved for future use
403 ForbiddenThe request was a legal request, but the server is refusing to respond to it
404 Not FoundThe requested page could not be found but may be available again in the future
405 Method Not AllowedA request was made of a page using a request method not supported by that page
406 Not AcceptableThe server can only generate a response that is not accepted by the client
407 Proxy Authentication RequiredThe client must first authenticate itself with the proxy
408 Request TimeoutThe server timed out waiting for the request
409 ConflictThe request could not be completed because of a conflict in the request
410 GoneThe requested page is no longer available
411 Length RequiredThe “Content-Length” is not defined. The server will not accept the request without it 
412 Precondition FailedThe precondition given in the request evaluated to false by the server
413 Request Entity Too LargeThe server will not accept the request, because the request entity is too large
414 Request-URI Too LongThe server will not accept the request, because the URL is too long. Occurs when you convert a POST request to a GET request with a long query information 
415 Unsupported Media TypeThe server will not accept the request, because the media type is not supported 
416 Requested Range Not SatisfiableThe client has asked for a portion of the file, but the server cannot supply that portion
417 Expectation FailedThe server cannot meet the requirements of the Expect request-header field

5xx: Server Error

Message:Description:
500 Internal Server ErrorA generic error message, given when no more specific message is suitable
501 Not ImplementedThe server either does not recognize the request method, or it lacks the ability to fulfill the request
502 Bad GatewayThe server was acting as a gateway or proxy and received an invalid response from the upstream server
503 Service UnavailableThe server is currently unavailable (overloaded or down)
504 Gateway TimeoutThe server was acting as a gateway or proxy and did not receive a timely response from the upstream server
505 HTTP Version Not SupportedThe server does not support the HTTP protocol version used in the request
511 Network Authentication RequiredThe client needs to authenticate to gain network access

HTML Error Messages

When a browser requests a service from a web server, an error might occur, and the server might return an error code like “404 Not Found”.

It is common to name these errors HTML error messages.

But these messages are something called HTTP status messages. In fact, the server always returns a message for every request. The most common message is 200 OK.

Below is a list of HTTP status messages that might be returned:

1xx: Information

Message:Description:
100 ContinueThe server has received the request headers, and the client should proceed to send the request body
101 Switching ProtocolsThe requester has asked the server to switch protocols
103 CheckpointUsed in the resumable requests proposal to resume aborted PUT or POST requests

2xx: Successful

Message:Description:
200 OKThe request is OK (this is the standard response for successful HTTP requests)
201 CreatedThe request has been fulfilled, and a new resource is created 
202 AcceptedThe request has been accepted for processing, but the processing has not been completed
203 Non-Authoritative InformationThe request has been successfully processed, but is returning information that may be from another source
204 No ContentThe request has been successfully processed, but is not returning any content
205 Reset ContentThe request has been successfully processed, but is not returning any content, and requires that the requester reset the document view
206 Partial ContentThe server is delivering only part of the resource due to a range header sent by the client

3xx: Redirection

Message:Description:
300 Multiple ChoicesA link list. The user can select a link and go to that location. Maximum five addresses  
301 Moved PermanentlyThe requested page has moved to a new URL 
302 FoundThe requested page has moved temporarily to a new URL 
303 See OtherThe requested page can be found under a different URL
304 Not ModifiedIndicates the requested page has not been modified since last requested
306 Switch ProxyNo longer used
307 Temporary RedirectThe requested page has moved temporarily to a new URL
308 Resume IncompleteUsed in the resumable requests proposal to resume aborted PUT or POST requests


4xx: Client Error

Message:Description:
400 Bad RequestThe request cannot be fulfilled due to bad syntax
401 UnauthorizedThe request was a legal request, but the server is refusing to respond to it. For use when authentication is possible but has failed or not yet been provided
402 Payment RequiredReserved for future use
403 ForbiddenThe request was a legal request, but the server is refusing to respond to it
404 Not FoundThe requested page could not be found but may be available again in the future
405 Method Not AllowedA request was made of a page using a request method not supported by that page
406 Not AcceptableThe server can only generate a response that is not accepted by the client
407 Proxy Authentication RequiredThe client must first authenticate itself with the proxy
408 Request TimeoutThe server timed out waiting for the request
409 ConflictThe request could not be completed because of a conflict in the request
410 GoneThe requested page is no longer available
411 Length RequiredThe “Content-Length” is not defined. The server will not accept the request without it 
412 Precondition FailedThe precondition given in the request evaluated to false by the server
413 Request Entity Too LargeThe server will not accept the request, because the request entity is too large
414 Request-URI Too LongThe server will not accept the request, because the URL is too long. Occurs when you convert a POST request to a GET request with a long query information 
415 Unsupported Media TypeThe server will not accept the request, because the media type is not supported 
416 Requested Range Not SatisfiableThe client has asked for a portion of the file, but the server cannot supply that portion
417 Expectation FailedThe server cannot meet the requirements of the Expect request-header field

5xx: Server Error

Message:Description:
500 Internal Server ErrorA generic error message, given when no more specific message is suitable
501 Not ImplementedThe server either does not recognize the request method, or it lacks the ability to fulfill the request
502 Bad GatewayThe server was acting as a gateway or proxy and received an invalid response from the upstream server
503 Service UnavailableThe server is currently unavailable (overloaded or down)
504 Gateway TimeoutThe server was acting as a gateway or proxy and did not receive a timely response from the upstream server
505 HTTP Version Not SupportedThe server does not support the HTTP protocol version used in the request
511 Network Authentication RequiredThe client needs to authenticate to gain network access

Pixel to Em Converter

The tool below allows you to work out the em sizes from pixels (or vice versa).

  • Set a default pixel size for body (usually 16px)
  • Then, convert a pixel value to em, based on the default pixel size
  • Or, convert an em value to pixels, based on the default pixel size

Set a default pixel size: px

Convert PX to EM:
 px

Convert EM to PX:
 em

Body Font Size

In the table below, select a body font size in pixels (px) to display a complete “px to em and percent” conversion table.

Tip: The default font size is usually 16px.

pxempercent
5px0.3125em31.25%
6px0.3750em37.50%
7px0.4375em43.75%
8px0.5000em50.00%
9px0.5625em56.25%
10px0.6250em62.50%
11px0.6875em68.75%
12px0.7500em75.00%
13px0.8125em81.25%
14px0.8750em87.50%
15px0.9375em93.75%
16px1.0000em100.00%
17px1.0625em106.25%
18px1.1250em112.50%
19px1.1875em118.75%
20px1.2500em125.00%
21px1.3125em131.25%
22px1.3750em137.50%
23px1.4375em143.75%
24px1.5000em150.00%
25px1.5625em156.25%

What is the difference between PX, EM and Percent?

Pixel is a static measurement, while percent and EM are relative measurements. The size of an EM or percent depends on its parent. If the text size of body is 16 pixels, then 150% or 1.5 EM will be 24 pixels (1.5 * 16). Look at CSS Units for more measurement units.

Keyboard Shortcuts For Windows and Mac

Keyboard shortcuts are often used in modern operating systems and computer software programs.

Learning and using keyboard shortcuts can save you a lot of time.


Basic Shortcuts

DescriptionWindowsMac OS
Edit menuAlt + ECtrl + F2 + F
File menuAlt + FCtrl + F2 + E
View menuAlt + VCtrl + F2 + V
Select all textCtrl + ACmd + A
Copy textCtrl + CCmd + C
Find textCtrl + FCmd + F
Find and replace textCtrl + HCmd + F
New DocumentCtrl + NCmd + N
Open a fileCtrl + OCmd + O
Print optionsCtrl + PCmd + P
Save fileCtrl + SCmd + S
Paste textCtrl + VCmd + V
Cut textCtrl + XCmd + X
Redo textCtrl + YShift + Cmd + Z
Undo textCtrl + ZCmd + Z

Text Editing

DescriptionWindowsMac OS
Cursor Movement
Go to the right or to the beginning of next line breakRight ArrowRight Arrow
Go to the left or to the end of previous line breakLeft ArrowLeft Arrow
Go up one rowUp ArrowUp Arrow
Go down one rowDown ArrowDown Arrow
Go to the beginning of the current lineHomeCmd + Left Arrow
Go to the end of the current lineEndCmd + Right Arrow
Go to the beginning of the documentCtrl + HomeCmd + Up Arrow
Go to the end of the documentCtrl + EndCmd + Down Arrow
Move up one framePage UpFn + Up Arrow
Move down one framePage DownFn + Down Arrow
Go to beginning of previous wordCtrl + Left ArrowOption + Left Arrow
Go to beginning of next wordCtrl + Right ArrowOption + Right Arrow
Go to beginning of line breakCtrl + Up ArrowCmd + Left Arrow
Go to end of line breakCtrl + Down ArrowCmd + Right Arrow
   
Text Selection
Select characters to the leftShift + Left ArrowShift + Left Arrow
Select characters to the rightShift + Right ArrowShift + Right Arrow
Select lines upwardsShift + Up ArrowShift + Up Arrow
Select lines downwardsShift + Down ArrowShift + Down Arrow
Select words to the leftShift + Ctrl + LeftShift + Opt + Left
Select words to the rightShift + Ctrl + RightShift + Opt + Right
Select paragraphs to the leftShift + Ctrl + UpShift + Opt + Up
Select paragraphs to the rightShift + Ctrl + DownShift + Opt + Down
Select text between the cursor and the beginning of the current lineShift + HomeCmd + Shift + Left Arrow
Select text between the cursor and the end of the current lineShift + EndCmd + Shift + Right Arrow
Select text between the cursor and the beginning of the documentShift + Ctrl + HomeCmd + Shift + Up Arrow or Cmd + Shift + Fn + Left Arrow
Select text between the cursor and the end of the documentShift + Ctrl + EndCmd + Shift + Down Arrow or Cmd + Shift + Fn + Right Arrow
Select one frame at a time of text above the cursorShift + Page UpShift + Fn + Up Arrow
Select one frame at a time of text below the cursorShift + Page DownShift + Fn + Down Arrow
Select all textCtrl + ACmd + A
Find textCtrl + FCmd + F
   
Text Formatting
Make selected text boldCtrl + BCmd + B
Make selected text italicCtrl + ICmd + I
Underline selected textCtrl + UCmd + U
Make selected text superscriptCtrl + Shift + =Cmd + Shift + =
Make selected text subscriptCtrl + =Cmd + =
   
Text Editing
Delete characters to the leftBackspaceBackspace
Delete characters to the rightDeleteFn + Backspace
Delete words to the rightCtrl + DelCmd + Backspace
Delete words to the leftCtrl + BackspaceCmd + Fn + Backspace
IndentTabTab
OutdentShift + TabShift + Tab
Copy textCtrl + CCmd + C
Find and replace textCtrl + HCmd + F
Paste textCtrl + VCmd + V
Cut textCtrl + XCmd + X
Redo textCtrl + YShift + Cmd + Z
Undo textCtrl + ZCmd + Z


Web Browsers

DescriptionWindowsMac OS
Navigation
Scroll down a frameSpace or Page DownSpace or Fn + Down Arrow
Scroll up a frameShift + Space or Page UpShift + Space or Fn + Up Arrow
Go to bottom of the pageEndCmd + Down Arrow
Go to top of the pageHomeCmd + Up Arrow
Go backAlt + Left Arrow or BackspaceCmd + Left Arrow
Go forwardAlt + Right Arrow or Shift + BackspaceCmd + Right Arrow
Refresh a webpageF5Cmd + R
Refresh a webpage (no cache)Ctrl + F5Cmd + Shift + R
StopEscEsc
Toggle full-screenF11Cmd + Shift + F
Zoom inCtrl + +Cmd + +
Zoom outCtrl + –Cmd + –
Zoom 100% (default)Ctrl + 0Cmd + 0
Open homepageAlt + HomeOption + Home or Option + Fn + Left Arrow
Find textCtrl + FCmd + F
   
Tab / Window Management
Open a new tabCtrl + TCmd + T
Close current tabCtrl + WCmd + W
Close all tabsCtrl + Shift + WCmd + Q
Close all tabs except the current tabCtrl + Alt + F4Cmd + Opt + W
Go to next tabCtrl + TabControl + Tab or Cmd + Shift + Right Arrow
Go to previous tabCtrl + Shift + TabShift + Control + Tab or Cmd + Shift + Left Arrow
Go to a specific tab numberCtrl + 1-8Cmd + 1-8
Go to the last tabCtrl + 9Cmd + 9
Reopen the last closed tabCtrl + Shift + TCmd + Shift + T
Open a new windowCtrl + NCmd + N
Close current windowAlt + F4Cmd + W
Go to next windowAlt + TabCmd + Tab
Go to previous windowAlt + Shift + TabCmd + Shift + Tab
Reopen the last closed windowCtrl + Shift + N 
Open links in a new tab in the backgroundCtrl + ClickCmd + Click
Open links in a new tab in the foregroundCtrl + Shift + ClickCmd + Shift + Click
Print current webpageCtrl + PCmd + P
Save current webpageCtrl + SCmd + S
   
Address Bar
Cycle between toolbar, search bar, and page elementsTabTab
Go to browser’s address barCtrl + L or Alt + DCmd + L
Focus and select the browser’s search barCtrl + ECmd + E / Cmd + K
Open the address bar location in a new tabAlt + EnterOpt + Enter
Display a list of previously typed addressesF4 
Add “www.” to the beginning and “.com” to the end of the text typed in the address bar (e.g., type “w3schools” and press Ctrl + Enter to open “www.w3schools.com”)Ctrl + EnterCmd + Enter or Control + Enter
   
Bookmarks
Open the bookmarks menuCtrl + BCmd + B
Add bookmark for current pageCtrl + DCmd + Opt + B or Cmd + Shift + B
Open browsing historyCtrl + HCmd + Shift + H or Cmd + Y
Open download historyCtrl + JCmd + J or Cmd + Shift + J

Screenshots

DescriptionWindowsMac OS
Save screenshot of the whole screen as file Cmd + Shift + 3
Copy screenshot of the whole screen to the clipboardPrtScr (Print Screen) or Ctrl + PrtScrCmd + Ctrl + Shift + 3
Save screenshot of window as file Cmd + Shift + 4, then Space
Copy screenshot of window to the clipboardAlt + PrtScrCmd + Ctrl + Shift + 4, then Space
Copy screenshot of wanted area to the clipboardCmd + Ctrl + Shift + 4
Save screenshot of wanted area as file Cmd + Shift + 4

Leave a Comment

Your email address will not be published. Required fields are marked *