Show Menu

HTML Cheat Sheet (DRAFT) by

Quick reference for HTML tags

This is a draft cheat sheet. It is a work in progress and is not finished yet.


Used for document format valida­tion. Inner nodes are not allowed.
The root tag for the document. Sub nodes allowed are <he­ad> and <bo­dy>.
Where meta inform­ation for the document does.
The document's main body.
<!-- ... -->
Comment, it will be ignored by the browser.

<he­ad> tags

Title of the document. Usually displayed in a broswer tab or window. Also used for SEO.
Metadata inform­ation for the document, like author, keywords, descri­pti­on...
Javascript code block, for page behaviour.
Style defini­tions for the page.
Allows for the inclusion of JS and CSS external files, and also related pages (previous, next,...)
Base URI for the links in the page.


A section of text.
Prefor­mated text, white space will be respected.
Explicit line break.
Horizontal line.
Character entities, can be used to render characters that are used as markup.
Citation (person), usually italic­ized.
Will show a little box with the full name for the abbrev­iation (title attribute) on mouse over.
Will show a little box with the full name for the acronym (title attribute) on mouse over.
Emphasis (italic), consider CSS.
Emphasis (bold), consider CSS.
Code format­ting.
Keyboard input.
Code variables.
Inline quote.

Text (block)

Primary heading, should only have one per document, used for SEO.
<h2> to <h6>
Sub heading, should not include higher level heading inside it.
A section of the document, can contain other data.
A paragraph of content, should contain just text.
Quote, can use the cite attribute to specify a URI where the quote was obtained.

Links and Anchors

HTML anchor. While there is only one tag, it serves two purposes, you can use attributes to specify the use. The name attibute is used to define a target anchor, and the href attibute for a source anchor. Use # to go to a target anchor in the document, or a element id, or title attribute to for a little popup.

Images and objects

Displays the image specified in the src attribute
Embedded object. Use the attributes data and type to specify the type object, and the inner content for an altern­ative when the browser has no support for the object.
Object inner tag, to pass parameters for the object. The parameters expected depend on the object type.


Unordered list, rendered as bullet points.
Ordered list, rendered with numeric or alpha charac­ters.
List item, used with ordered and unordered lists.
Definition list, list of terms and their defini­tion.
Term, for definition lists.
Defini­tion, for definition lists.


Main table tag, encaps­ulates all the others.
Title for the table
The table header, usually a single row.
The table footer, usually a single row.
The table body, with multiple rows repres­enting the data. Must come after the header and footer.
Table row, required for the header, footer and body.
Data cell for the header.
Data cell for the footer and body.

Semantic elements

Wraps the main content of the page. Navigation and copyright inform­ation, for example, should not be included inside the main block.
Usually inside the <ma­in>, represents a way to group important inform­ation.
Represents inform­ation that might be important, but not as important as the rest of the content.
Used to group related content.
Logical header for the content.
Logical footer for the content.
Logical container for site naviga­tion.
Identifies a point in time. Can be a date, a time or a datetime. Can have a pubdate attribute to specify a public­ation date, but there can only be one pubdate on the page.
Adds semantic meaning to images.
Used inside a <fi­gur­e>, contains the caption for the figure.
Will initially be collapsed to show the <su­mma­ry> content, will expand to the rest of the content once clicked.
Contains short descri­ption about the detail. Used inside <de­tai­ls>.
Used to highlight terms in search results.
Bidire­ctional isolated element. Used to change the horizontal direction of text.
Word break element. Tells the browser where to hyphenate a word when wrapping is required.
Used to show the result of a calcul­ation, or the output of a command line.
Host container for external contai­ners.
These are used to describe content to a search engine, not to add behaviour to a page.