Elements & components

Sectioning elements

Sectioning elements allow you to organize the content into logical pieces. Use the sectioning elements to create an outline for your page layout, including header and footer navigation, and heading elements to identify sections of content. This is an inportant part of inclusive design, where accessibility tools depends on this information. Used right, it minimizes the need for aria-coding of content. They are all block elements (display: block;), taking up the full width unless custom styled otherwise.

Sectioning elements are often the containers for so-called ”regions” or ”organism” in designer lingo. Sometimes they instead act as a wrapper for a ”component”, or ”molecule”.

Address <address>

The enclosed HTML should provide some kind of contact information for a person, a group of people, or for an organization. Block element.

www.acehotel.com
contact us

Ace Hotel
20 W 29th St
New York, NY 10001
USA

Article <article>

A self-contained composition in a document, page, application, or site, which is intended to be independently distributable or reusable. Often created dynamic with templates. Examples include a forum post, a magazine or newspaper article, a blog entry, a product card, a user-submitted comment, an interactive widget or gadget, or any other independent item of content. Block element.

article
Variants
Title
Title Description
Title
Description

Title

Description

Body text

Label
i
KPI
Trend
Status
AAA 21.00 Fail 1.00
Color name
#000000
rgb(0 0 0)
hsl(0 0% 0%)
Luminance: 0%

Audio track label

Speaker Camera

Aside <aside>

Content that is only indirectly related to the document's main content. Asides are often presented as sidebars or call-out boxes. Block element.

Body <body>

The structuring root, represents the content of an HTML document. There can only be one <body> element in a document. Block element.

Content division <div>

A generic container, or wrapper, for flowing content. It has no effect on the content or layout until explicitly styled in some way using CSS. Block element.

div
Variants
Width containers
.half
.half
.third
.third
.third
.twothirds
.third
.quarter
.quarter
.quarter
.quarter
.threequarter
.quarter
.sixth
.sixth
.sixth
.sixth
.sixth
.sixth
Styled containers
.panel
.button-group
Fixed position containers
.display-top
...-left
...-middle
...-right
...-bottom

Footer <footer>

A footer of its current context. A footer typically contains information about the author of the section, additional navigation and sometimes copyright and other legal information.

A footer directly under the root <body> is good practice for accessibility reasons, helping screen readers finding the right content. Block element.

footer

Header <header>

Represents introductory content, typically initial descriptive text or navigation. A header directly under the root <body> should normally contain the main navigation for accessibility reasons, and may also contain a logotype, a search form, user settings, and other elements. Block element.

header

Heading group <hgroup>

A group of heading information, e.g. a heading and a tag line. Block element.

Heading

Tagline

Main content area <main>

Contains the main content of the body of a document. It consists of content that is directly related to the central topic or the functionality and purpose of a document. There should only be one <main> element. Block element.

Navigation <nav>

Represents a section of a page whose purpose is to provide navigation links, either within the current document or to other documents. Common examples of navigation sections are navigation menus, tables of contents, and indexes. Block element.

Variants

Section <section>

Represents a generic standalone section of a document, which doesn't have a more specific semantic element to represent it. The section is often used for defining layout flow within the section, and for alternating full-width backgrounds. Sections should always be stacked vertically. Block element.

A section
Variants

The Header

This is an introduction, or ingres, that might span over multiple rows. It should be one size larger than the body text.

A body subheader

This is the body text. This is the default text size that everything else is based on. The structure should provide a visual hierarchy, and help readers find the right information.

The Header

This is an introduction, or ingres, that might span over multiple rows. It should be one size larger than the body text.

A body subheader

This is the body text. This is the default text size that everything else is based on. The structure should provide a visual hierarchy, and help readers find the right information.

The Header

This is an introduction, or ingres, that might span over multiple rows. It should be one size larger than the body text.

A body subheader

This is the body text. This is the default text size that everything else is based on. The structure should provide a visual hierarchy, and help readers find the right information.

The Header

This is an introduction, or ingres, that might span over multiple rows. It should be one size larger than the body text.

A body subheader

This is the body text. This is the default text size that everything else is based on. The structure should provide a visual hierarchy, and help readers find the right information.

The Header

This is an introduction, or ingres, that might span over multiple rows. It should be one size larger than the body text.

A body subheader

This is the body text. This is the default text size that everything else is based on. The structure should provide a visual hierarchy, and help readers find the right information.

The Header

This is an introduction, or ingres, that might span over multiple rows. It should be one size larger than the body text.

A body subheader

This is the body text. This is the default text size that everything else is based on. The structure should provide a visual hierarchy, and help readers find the right information.

The Header

This is an introduction, or ingres, that might span over multiple rows. It should be one size larger than the body text.

A body subheader

This is the body text. This is the default text size that everything else is based on. The structure should provide a visual hierarchy, and help readers find the right information.

Title

Parallax section

Front text

Content elements

Use content elements to organize content placed in content sectioning elements. These elements identify the purpose and structure of your content and is important for accessibility and SEO.

Use the inline elements to define the meaning, structure, or style of a word, line, or any arbitrary piece of text.

Content elements are either used by themselves, as ”elements” or ”atoms” in design language, or as wrappers for child elements, then sometimes called ”components” or ”molecules”.

Hyperlink <a>

Hyperlinks connect webpages or data items to one another. <a> elements define hyperlinks from a spot on a webpage (like a text string or image) to another spot on some other webpage (or even on the same page). Inline element.

Hyperlink
Variants
Fancy text link

Abbreviation <abbr>

Represents an abbreviation or acronym. Shows a tooltip text explaining the abbreviation. Inline element.

HTML

Audio <audio>

Used to embed sound content in documents. It may contain one or more audio sources, represented using the src attribute or the source element: the browser will choose the most suitable one. It can also be the destination for streamed media, using a MediaStream. Inline element.

Bring attention to <b>

Used to draw the reader's attention to the element's contents, which are not otherwise granted special importance. This was formerly known as the Boldface element, and most browsers still draw the text in boldface. However, you should not use <b> for styling text or granting importance. If you wish to create boldface text, you should use the CSS font-weight property. If you wish to indicate an element is of special importance, you should use the strong element. Inline element.

Bold text, but not a strong emphasize.

Bidirectional isolate <bdi>

Tells the browser's bidirectional algorithm to treat the text it contains in isolation from its surrounding text. It's particularly useful when a website dynamically inserts some text and doesn't know the directionality of the text being inserted. Inline element.

two words

Bidirectional override <bdo>

Overrides the current directionality of text, so that the text within is rendered in a different direction. Inline element.

two words

Blockquote <blockquote>

Indicates that the enclosed text is an extended quotation. Usually, this is rendered visually by indentation. A URL for the source of the quotation may be given encapsuled in the cite attribute. Block element.

Bacon ipsum dolor amet capicola t-bone alcatra ball tip, tail drumstick meatloaf. Ribeye cupim landjaeger pork flank chicken meatloaf filet mignon frankfurter shank jowl brisket kevin andouille. Tail doner cupim burgdoggen chicken, flank rump leberkas pork loin. Bacon short ribs meatloaf sausage. Meatloaf ground round tongue, flank t-bone turkey turducken.

Line break <br>

Produces a line break in text (carriage-return). It is useful for wrapping text when the division of lines is significant.Inline element. An alternative is the <wbr>, a suggested line break.


Button <button>

An interactive element activated by a user with a mouse, keyboard, finger, voice command, or other assistive technology. Once activated, it performs an action, such as submitting a form or opening a dialog. Inline block element.

Types
Icon left, icon right, no icon, round
Variants

Buttons are available in different weights, to help the user to prioritize between different actions.

Positive actions should have the highest contrast to make it easy for the user to proceed forward. It should generate a low cognitive load and feel pleasant. Positive actions should use the CTA, Primary or Secondary type of buttons. The different weights enable prioritization between positive actions.

Neutral actions should use the Secondary or Tertiary types.

Positive, neutral, and negative actions should be separated in color and contrast.

Positive – Add, change or process information
Neutral – No change, cancel, display extra information
Negative – Delete, reset or block information

Semantic colors

Some button types also have meanings based on semantic colors, like the negative button. Negative actions should increase attention and make the user think before continuing with the action. This is achieved by using the Negative or Negative-secondary type.

If positive and negative actions appear on the same page, The negative action should use the Negative-secondary type, in order to let the positive action have a higher weight. If there are only neutral and negative buttons, the negative should have higher contrast than the neutral.

Other variants

The inverted button is suited for placement on dark image backgrounds.

Chips are compact elements that represent an input, attribute, or action. Chips allow users to enter information, make selections, filter content, or trigger actions. While buttons are expected to appear consistently and with familiar calls to action, chips should appear dynamically as a group of multiple interactive elements.

  • Chips are compact components that represent discrete information.
  • Chips should have a clear and helpful relationship to the content or task they represent.
  • Chips should make tasks easier to complete, or content easier to sort.

Canvas <canvas>

Container element to use with either the canvas scripting API or the WebGL API to draw graphics and animations. Inline element.

Canvas is a better choice than svg if you like to be able to save the image as jpg or png, if it is animation heavy (because it uses the GPU, not CPU), and if you like to use a raster image or apply raster effects. The content of a canvas is not part of the DOM and can not be styled with CSS, nor be accessed by screen readers. Svgs are a better choice for interaction heavy vector images, like infographics aimed for the screen.

canvas

Checkbox <input type="checkbox">

Checkboxes allow users to select multiple items from a list of options and to mark them as selected (checked). Inline block element. The user should not be required to select a value. Checkboxes should be used for choosing none or multiple options from a list of 2 – 5 options. A single option checkbox (boolean) should be replaced with a switch, except when space is limited, or if a switch gets too high visual weight in the current context. The single option checkbox can sometimes be replaced by other types of toggle controls.

It should be visible at a glance if a checkbox has been selected, and selected items should be more visually prominent than unselected items. That’s the reason why we choose to have a different background color when checked. Checkboxes make it easy to compare available options, unlike selects where the options are hidden in a dropdown.

Checkboxes should always be followed by a label. If a label is not defined, the checkbox most often gets associated with an enclosing element, like a card, panel, item or something else framing the checkbox.

Indeterminate

A checkbox is either checked or not. But there is another checkbox state handled in browsers – indeterminate – that can be set by JavaScript and styled by the css pseudo-selector :indeterminate. It is used as a grouping element, indicating that some of the included checkboxes are checked, but not all.

Disabled

A checkbox in a disabled state shows that a selection exists, but is not available in that circumstance. This can be used to maintain layout continuity and communicate that an action may become available later.

Read-only

Checkboxes have a read-only option for when they are selected and in read mode, but still need their checkbox to be shown. This allows for content to be copied, but not interacted with or changed.

Cite <cite>

Used to mark up the title of a cited creative work within a <blockquote>. Part of the citation metadata. Inline element.

Study of user behavior

Code <code>

Displays its contents styled in a fashion intended to indicate that the text is a short fragment of computer code. By default, the content text is displayed using the user agent default monospace font. Inline element.

// code goes here
Variants <code> with child rows //commentconst A;const B;const C = A + B;

Data <data>

Links a given piece of content with a machine-readable translation. If the content is time- or date-related, the time element must be used. Inline element.

Dimension
Variants

344

Description details <dd>

Provides the description, definition, or value for the preceding term in a description list. Block element.

Description

Deleted text <del>

Represents a range of text that has been deleted from a document. This can be used when rendering ”track changes”, or source code diff information, for example. The <ins> element can be used for the opposite purpose: to indicate text that has been added to the document. Inline element.

Deleted text

Definition <dfn>

Used to indicate the term being defined within the context of a definition phrase or sentence. The ancestor <p> element, the <dt>/<dd> pairing, or the nearest section ancestor of the <dfn> element, is considered to be the definition of the term. Inline element.

A definition creates a description of a term.

Description list <dl>

Represents a description list. The element encloses a list of groups of terms and descriptions. Common uses for this element are to implement a glossary or to display metadata (a list of key-value pairs). Block element.

Term 1
Description
Term 2
Description

Description term <dt>

Specifies a term in a description or definition list, and as such must be used inside a <dl> element. It is usually followed by a <dd> element; however, multiple <dt> elements in a row indicate several terms that are all defined by the immediate next <dd> element. Block element.

Description

Details <details>

Creates a collapsed section in which information is visible only when the widget is toggled into an "open" state with the open attribute. A summary or label must be provided using the <summary> element. Block element.

details
details with summarydetails
more details

Dialog <dialog>

Default non-visible. Represents a dialog box or other interactive component, such as a dismissible alert, inspector, or subwindow. Block element.

Dialog heading

Text message

Variants

Emphasis <em>

Marks text that has stress emphasis. The <em> element can be nested, with each level of nesting indicating a greater degree of emphasis. Inline element.

Emphasis

Embed external content <embed>

Embeds external content at the specified point in the document. This content is provided by an external application or other source of interactive content such as a browser plug-in. Inline element.

Field set <fieldset>

Used to group several controls as well as labels & legend within a web form. Block element.

Field set legend

Figure <figure>

A container for some kind of visual content, with an optional figure caption. The figure, its caption, and its contents are referenced as a single unit. Block element.

16:9 image ratio
16:9 image ratio
Variants
.circle
Text inside figure
.square
Text inside figure
.pie
Dimension
.donut
Dimension
.donut
344
.pyramid-3

Figure caption <figcaption>

Represents a caption or legend describing the rest of the contents of its parent <figure> element. Block element.

figcaption

Form <form>

A document section containing interactive controls for submitting information. Fields within a form is subject to constraint validation. Block element.

A form

Headings

Represent six levels of section headings. <h1> is the highest section level and <h6> is the lowest. Block elements.

Level 1 <h1>

Level 2 <h2>

Level 3 <h3>

Level 4 <h4>

Level 5 <h5>
Level 6 <h6>

Horizontal rule <hr>

Represents a thematic break between paragraph-level elements: for example, a change of scene in a story, or a shift of topic within a section. Block element.


Variants


Idiomatic text <i>

Represents a range of text that is set off from the normal text for some reason, such as idiomatic text, technical terms, taxonomical designations, among others. Historically, these have been presented using italicized type, which is the original source of the <i> naming of this element. Inline element.

Idiomatic text

Inline frame <iframe>

Represents a nested browsing context, embedding another HTML page into the current one. Originally removed in the HTML5 spec, together with other frames. Inline element. Largely replaced with asyncronous XHR requests.

Image <img>

Embeds an image into the document. Inline element.

Windmill
Variants Windmill Windmill Windmill

Inserted text <ins>

A range of text that has been added to a document. You can use the <del> element to similarly represent a range of text that has been deleted from the document. Inline element.

Inserted text

Keyboard input <kbd>

Represents a span of inline text denoting textual user input from a keyboard, voice input, or any other text entry device. By convention, the user agent defaults to rendering the contents of a <kbd> element using its default monospace font, although this is not mandated by the HTML standard. Inline element.

option + S

Label <label>

A caption for an item in a user interface. Should wrap the item (e.g. <input>), or use the for attribute. Inline element.

Variants
label with checkbox or radiobutton
label with switch

Legend <legend>

A caption for the content of its parent <fieldset>. Block element.

Field set legend

List item <li>

Represents an item in a list. It must be contained in a parent element: an ordered list <ol>, an unordered list <ul>, or a menu <menu>. Block element. In menus and unordered lists, list items are usually displayed using bullet points. In ordered lists, they are usually displayed with an ascending counter on the left, such as a number or letter.

  • list item
  • Variants
    • AContentmore

    Marked text <mark>

    Text content which is marked or highlighted for reference or notation purposes due to the marked passage's relevance in the enclosing context. Inline element.

    Marked text

    Math ML <math>

    The top-level element in MathML. Every valid MathML instance must be wrapped in it. In addition you must not nest a second <math> element in another, but you can have an arbitrary number of other child elements in it. Inline element.

    π 2 3

    Menu <menu>

    A semantic alternative to an unordered list, but treated by browsers (and exposed through the accessibility tree) no different. It represents an unordered list of actions (which are represented by <li> elements). Block element.

  • list item A
  • list item B
  • Meter <meter>

    Represents either a scalar value within a known range or a fractional value. Inline block element.

    20
    Variants

    External object <object>

    Represents an external resource, which can be treated as an image, a nested browsing context, or a resource to be handled by a plugin. Inline element.

    Option <option>

    Used to define an item contained in a <select>, an <optgroup>, or a <datalist> element. As such, <option> can represent menu items in popups and other lists of items in an HTML document. Block element.

    Option group <optgroup>

    Creates a grouping of options within a <select> element. Block element.

    Ordered list <ol>

    An ordered list of items — typically rendered as a numbered list. Block element.

    1. list item A
    2. list item B
    Variants
    1. Event A

      Description text

    2. Event B

      Description text

    3. Event C

      Description text

    4. Event D

      Description text

    1. Event A

      Description text

    2. Event B

      Description text

    3. Event C

      Description text

    4. Event D

      Description text

    Output <output>

    Container element into which a site or app can inject the results of a calculation or the outcome of a user action. Inline element.

    output

    Paragraph <p>

    Represents a paragraph. Paragraphs are usually represented in visual media as blocks of text separated from adjacent blocks by white space and/or first-line indentation, but HTML paragraphs can be any structural grouping of related content, such as images or form fields. Block element.

    This is a paragraph — Bacon ipsum dolor amet capicola t-bone alcatra ball tip, tail drumstick meatloaf. Ribeye cupim landjaeger pork flank chicken meatloaf filet mignon frankfurter shank jowl brisket kevin andouille. Tail doner cupim burgdoggen chicken, flank rump leberkas pork loin. Bacon short ribs meatloaf sausage. Meatloaf ground round tongue, flank t-bone turkey turducken.

    A second paragraph.

    Variants

    Bacon ipsum dolor amet capicola t-bone alcatra ball tip, tail drumstick meatloaf. Ribeye cupim landjaeger pork flank chicken meatloaf filet mignon frankfurter shank jowl brisket kevin andouille. Tail doner cupim burgdoggen chicken, flank rump leberkas pork loin. Bacon short ribs meatloaf sausage. Meatloaf ground round tongue, flank t-bone turkey turducken.

    Bacon ipsum dolor amet capicola t-bone alcatra ball tip, tail drumstick meatloaf. Ribeye cupim landjaeger pork flank chicken meatloaf filet mignon frankfurter shank jowl brisket kevin andouille. Tail doner cupim burgdoggen chicken, flank rump leberkas pork loin. Bacon short ribs meatloaf sausage. Meatloaf ground round tongue, flank t-bone turkey turducken.

    Bacon ipsum dolor amet capicola t-bone alcatra ball tip, tail drumstick meatloaf. Ribeye cupim landjaeger pork flank chicken meatloaf filet mignon frankfurter shank jowl brisket kevin andouille. Tail doner cupim burgdoggen chicken, flank rump leberkas pork loin. Bacon short ribs meatloaf sausage. Meatloaf ground round tongue, flank t-bone turkey turducken.

    Bacon ipsum dolor amet capicola t-bone alcatra ball tip, tail drumstick meatloaf. Ribeye cupim landjaeger pork flank chicken meatloaf filet mignon frankfurter shank jowl brisket kevin andouille. Tail doner cupim burgdoggen chicken, flank rump leberkas pork loin. Bacon short ribs meatloaf sausage. Meatloaf ground round tongue, flank t-bone turkey turducken.

    Picture <picture>

    Contains zero or more <source> elements and one <img> element to offer alternative versions of an image for different display/device scenarios. Inline element.

    16:9 image ratio

    Preformatted text <pre>

    Preformatted text which is to be presented exactly as written in the HTML file. The text is typically rendered using a non-proportional, or monospaced, font. Whitespace inside this element is displayed as written. Block element.

    Progress <progress>

    Displays an indicator showing the completion progress of a task, typically displayed as a progress bar. Inline block element.

    70%

    Inline quotation <q>

    Indicates that the enclosed text is a short inline quotation. Most modern browsers implement this by surrounding the text in quotation marks. This element is intended for short quotations that don't require paragraph breaks; for long quotations use the <blockquote> element. Inline element.

    Inline quotation

    Radio button <input type="radio">

    Radio buttons allow users to select one item from a list of options. Inline block element. One value should always be pre-selected. Radio buttons should be used for choosing one option from a list of 2 – 5 options.

    It should be visible at a glance if a radio button has been selected, and the selected item should be more visually prominent than unselected items. Radio buttons make it easy to compare available options, unlike selects where the options are hidden in a dropdown.

    Range <input type="range">

    Interactive control used to input numeric data from the user. It should hava a max and min attribute, as well as a step defining the granularity of the values. Inline block element.

    Variants .vertical .circular

    Ruby annotation <ruby>

    The <ruby> element represents small annotations that are rendered above, below, or next to base text, usually used for showing the pronunciation of East Asian characters. It can also be used for annotating other kinds of text, but this usage is less common.

    The term ruby originated as a unit of measurement used by typesetters, representing the smallest size that text can be printed on newsprint while remaining legible. Inline element.

    <rt> (Ruby text) is the encaplsulated ruby text, this is normally rendered as a block element.

    明日 (Ashita)

    Strikethrough <s>

    Renders text with a strikethrough, or a line through it. Use the <s> element to represent things that are no longer relevant or no longer accurate. However, <s> is not appropriate when indicating document edits; for that, use the del and ins elements, as appropriate. Inline element.

    Strikethrough text

    Sample output <samp>

    Used to enclose inline text which represents sample (or quoted) output from a computer program. Its contents are typically rendered using the browser's default monospaced font. Inline element.

    Sample output text

    Select <select>

    An input control that provides a menu of options. Inline block element.

    Variants

    Small print <small>

    Used for side-comments and small print, like copyright and legal text, independent of its styled presentation. By default, it renders text within it one font-size smaller, such as from small to x-small. Inline element.

    small content

    Content span <span>

    A generic inline container for phrasing content, which does not inherently represent anything. It can be used to group elements for styling purposes (using the class or id attributes), or because they share attribute values, such as lang. It should be used only when no other semantic element is appropriate. <span> is very much like a div element, but div is a block-level element whereas a <span> is an inline element.

    small content
    Variants

    .error
    .field-description .field-validation .jump
    .larger
    .wide
    .badge
    .counter
    .inverted

    Strong Importance <strong>

    Indicates that its contents have strong importance, seriousness, or urgency. Browsers typically render the contents in bold type. Inline element.

    Text of strong importance

    Subscript <sub>

    Specifies inline text which should be displayed as subscript for solely typographical reasons. Subscripts are typically rendered with a lowered baseline using smaller text. Inline element.

    H2O

    Summary <summary>

    Specifies a summary, caption, or legend for a details element's disclosure box. Clicking the <summary> element toggles the state of the parent <details> element open and closed. Block element.

    summarydetails
    more details

    Superscript <sup>

    Specifies inline text which is to be displayed as superscript for solely typographical reasons. Superscripts are usually rendered with a raised baseline using smaller text. Inline element.

    130 m2

    SVG <svg>

    Container defining a new coordinate system and viewport. It is used as the outermost element of SVG documents, but it can also be used to embed an SVG fragment inside an SVG or HTML document. Inline element.

    Switch <input type="checkbox" class="bool">

    A boolean choice, true or false, on or off, etc. Not an HTML element, but a styled single <input type="checkbox">, checked or not. Inline block element.

    Table <table>

    A container for tabular data — that is, information presented in a two-dimensional table comprised of rows and columns of cells containing data. Table element.

    Col title Col title
    Row title A1 B1
    Row title A2 B2
    Caption
    Col A Col B Col C
    Row 1 A1 B1 C1
    Row 2 A2 B2 C2
    Row 3 A3 B3 C3
    Col foot Col foot

    Table body <tbody>

    Tabular data — that is, information presented in a two-dimensional table comprised of rows and columns of cells containing data. Table element.

    Col title Col title
    Row title A1 B1
    Row title A2 B2

    Table caption <caption>

    Specifies the caption (or title) of a table. Table element.

    Table of facts
    Col title Col title
    Row title A1 B1
    Row title A2 B2

    Table column <col>

    Defines a column within a table and is used for defining common semantics on all common cells. It is generally found within a <colgroup> element. Table element.

    Col title Col title
    Row title A1 B1
    Row title A2 B2

    Table column group <colgroup>

    Defines a group of columns within a table. Table element.

    Col title Col title
    Row title A1 B1
    Row title A2 B2

    Table data cell <td>

    Defines a cell of a table that contains data. It participates in the table model. Table element.

    Col title Col title
    Row title A1 B1
    Row title A2 B2

    Table foot <tfoot>

    Defines a set of rows summarizing the columns of the table. Table element.

    Col title Col title
    Row title A1 B1
    Row title A2 B2
    Sum Col 1 Col 2

    Table head <thead>

    Defines a set of rows defining the head of the columns of the table. Table element.

    Col title Col title
    Row title A1 B1
    Row title A2 B2
    Sum Col 1 Col 2

    Table header cell <th>

    Defines a cell as header of a group of table cells. The exact nature of this group is defined by the scope and headers attributes. Table element.

    Col title Col title
    Row title A1 B1
    Row title A2 B2

    Table row <tr>

    Defines a row of cells in a table. The row's cells can then be established using a mix of <td> (data cell) and <th> (header cell) elements. Table element.

    Col title Col title
    Row title A1 B1
    Row title A2 B2

    Textarea <textarea>

    Represents a multi-line plain-text editing control, useful when you want to allow users to enter a sizeable amount of free-form text, for example a comment on a review or feedback form. Inline block element.

    Text input <input type="...">

    Used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent. The <input> element is one of the most powerful and complex in all of HTML due to the sheer number of combinations of input types and attributes. Inline block element.

    Types

    Time <time>

    Contains a specific period in time. It may include the datetime attribute to translate dates into machine-readable format, allowing for better search engine results or custom features such as reminders. Inline element.

    Unarticulated annotation <u>

    A span of inline text which should be rendered in a way that indicates that it has a non-textual annotation. This is rendered by default as a simple solid underline, but may be altered using CSS. Inline element.

    Unarticulated annotation

    Unordered list <ul>

    An unordered list of items, typically rendered as a bulleted list. Block element.

    • list item A
    • list item B
    Variants
    • AItem A
    • BItem B
    • CItem C
    • DItem D
    • AItem A
    • BItem B
    • CItem C
    • DItem D

      List with heading

    • AItem A
    • BItem B
    • CItem C
    • DItem D

    Variable <var>

    Represents the name of a variable in a mathematical expression or a programming context. It's typically presented using an italicized version of the current typeface, although that behavior is browser-dependent. Inline element.

    Variable A

    Video <video>

    Embeds a media player which supports video playback into the document. You can use <video> for audio content as well, but the audio element may provide a more appropriate user experience. Inline element.

    Non-visible elements

    These contains additional data, structure, external references for enriching the content. They should not be styled, with the exception of setting the size of 1rem by setting font-size on the html element. Also, CSS themes should be set as a class on the html element.

    Image map area <area>

    Defines a clickable area inside an <map> that has predefined clickable areas. An image map allows geometric areas on an image to be associated with hyperlink.

    Base <base>

    Specifies the base URL to use for all relative URLs in a document. There can be only one such element in a document.

    Data list <datalist>

    Contains a set of <option> elements that represent the selectable or recommended options available to choose from within other controls.

    Head <head>

    Contains machine-readable information (metadata) about the document, like its title, scripts, and style sheets.

    HTML <html>

    Represents the root (top-level element) of an HTML document, so it is also referred to as the root element. All other elements must be descendants of this element.

    Link <link>

    Specifies relationships between the current document and an external resource. This element is most commonly used to link to CSS, but is also used to establish site icons (both "favicon" style icons and icons for the home screen and apps on mobile devices) among other things.

    Image map <map>

    Used with <area> elements to define an image map (a clickable link area).

    Click to go Left Click to go Right

    Meta <meta>

    Represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> and <title>.

    No script <noscript>

    Defines a section of HTML to be inserted if script is unsupported (e.g. email) or if scripting is currently turned off in the browser.

    Script <script>

    Used to embed executable code or data; this is typically used to embed or refer to JavaScript code. The <script> element can also be used with other languages, such as WebGL's GLSL shader programming language and JSON.

    Slot <slot>

    Part of the Web Components technology suite, this element is a placeholder inside a web component that you can fill with your own markup, which lets you create separate DOM trees and present them together.

    Media source <source>

    Specifies multiple media resources for the picture, the audio element, or the video element. It is a void element, meaning that it has no content and does not have a closing tag. It is commonly used to offer the same media content in multiple file formats in order to provide compatibility with a broad range of browsers given their differing support for image file formats and media file formats.

    Style <style>

    Contains style information for a document, or part of a document. It contains CSS, which is applied to the contents of the document containing this element.

    Template <template>

    A mechanism for holding HTML that should not be rendered when a page is loaded, but may be instantiated during runtime with JavaScript.

    Used as a child of the media elements, audio and video. It lets you specify timed text tracks (or time-based data), for example to automatically handle subtitles. The tracks are formatted in WebVTT format (.vtt files)—Web Video Text Tracks.

    Title <title>

    Defines the document's title that is shown in a browser's title bar or a page's tab. Important for SEO. It only contains text, tags within the element are ignored.

    Line break opportunity <wbr>

    Represents a word break opportunity — a position within text where the browser may optionally breaka line, though its line-breaking rules would not otherwise create a break at that location. <wbr>

    Components

    Type of UI components

    • Elements – small, stand-alone components like buttons, icons, fields & text. Also called Basics or Atoms. These are primarily the content elements described above.
    • Components – assembled small components into a larger component, like a search component. Also called Modules or Molecules. Most often wrapped in sectioning elements described above, but can also be custom HTML elements.
    • Regions – A full part of the UI, like left navigation or top header. Also called Zones or Organisms. These should always be wrapped in sectioning elements for accessibility reasons.
    • Layouts – How the pieces are laid out on the page, like header, sidebar, main content, footer. Also called templates. Can be fixed or fluid grids, e.g. flex flow.

    This section describes the combined elements defined as Components above.

    App bar

    The top app bar (header) provides content identifying the page (like brand and title) and first serves as a confirmation of the users last action. It might also contains general actions and app navigation. The app bar can transform to show contextual actions in some cases, but it should then be possible to close.

    • Top app bars appear at the top of each screen in an app, but can disappear upon scroll.
    • Top app bars provide a reliable way to guide users through an app.
    • Top app bars have a consistent position and content to increase familiarity.

    Bottom app bar is often used for contextual actions, sometimes within a bottom drawer. Bottom app bars on mobile devices could allow movement between primary destinations in an app. It should then display three to five navigation items at the bottom of a screen. Each item represented by an icon and a text label. When an item is tapped, the user is taken to the associated destination. The bottom app bar is called “Tab bar” in iOS.

    The bottom navigation is easy to reach on a handheld mobile device. When used, the bottom navigation appears at the bottom of every screen.

    Breadcrumb

    Description

    Cards

    Cards contain content and actions about a single subject. Cards are surfaces that display content and actions on a single topic. They should be easy to scan for relevant and actionable information. Elements, like text and images, should be placed on them in a way that clearly indicates hierarchy. Cards are <article> components.

    • A card is identifiable as a single, contained unit.
    • A card can stand alone, without relying on surrounding elements for context.
    • A card cannot merge with another card, or divide into multiple cards.
    Ace Hotel • NYC Ace Hotel • NYC
    Ace Hotel • NYC
    20 W 29th St, New York
    A favorite hotel on Manhattan
    Ace Hotel • NYC
    A favorite hotel on Manhattan

    Ace Hotel • NYC

    20 W 29th St, New York

    A favorite hotel on Manhattan

    Color swatch

    A component for displaying a color, it's luminance and WCAG contrast levels to black and white. An <article> component.

    AA Large 3.05 AA 6.88
    Primary-500
    #619E9C
    rgb(97 158 156)
    hsl(178 24% 50%)
    Luminance: 29.40%

    Compact cassette

    A more playful audio player. Click for play, double click for pause. An <article> component. Should be placed in a half-width container.

    Freil – West of Motebe

    Dashboard widget

    A dashboard widgets purpose is to give the user a chance to monitor a curated set of meaningful KPIs. The main purpose is to identify deviations for further exploration. The KPIs contains some kind of value, a trend (over 12 mos) and sometimes a comparison or assessment, like "25% better than industry average". It is an <article> component.

    Comparison may be done against previous month, the same date previous year, a current industry average, or industry average for the same date previous year. When comparing, the difference could be displayed both as absolute values, or as a percentage change. All of this doesn't fit in a simple "at-a-glance" widget, so we need to prioritize wisely.

    Values could be a current value, a sum over a timeperiod (1/3/6/12 months) or an average over a timeperiod. If comparing separate line chart series per year, these series should most often be monthly values rather than rolling 12 mos (R12) to show normal monthly variations.

    Ratios

    A ratio express the relation between two or more parts. It could be expressed in many ways. 0.25, 1/4, 25%, 1:4 or "a quarter" are all different ways of expressing a ratio. 1:10:8 is also a ratio.

    Earnings after tax (R12)
    i
    864k SEK
    Nov '22 – Apr '23

    File drop

    Drag & drop supported file upload control.

    Icon

    Description

    Pie chart

    Pie charts are good for showing an approximate ratio between different dimensions. User studies shows that users have difficulties assessing the sizes of the slizes correctly, if this is important choose a bar chart instead.

    A donut chart is just a variant of the pie chart.

    Pie chart
    Donut chart

    Slide deck

    Description

    Title

    Body text

    Image caption

    Title

    Body text

    Image caption
    Business
    People
    Tech

    Title

    Body text

    What?

    Why?

    To whom?

    When?

    Swipe slides

    Description

    Tag

    Description

    Timeline

    A timeline is a list, ordered by time/date. Each entry (list item) should contain a <time> element and could have a visual status. Supported statuses are active, done or warning.

    Placed in full-width container
    1. Start-up

      Product-market fit

    2. Scale-up

      Customer-centered

    3. Regional

      Efficiency focus

    4. Global

      Too big to care

    Placed in half-width container
    1. Event A

      Description text

    2. Event B

      Description text

    3. Event C

      Description text

    4. Event D

      Description text

    Placed in a quarter container
    1. Event A

      Description text

    2. Event B

      Description text

    3. Event C

      Description text

    4. Event D

      Description text

    Venn diagram

    A Venn diagram is used to show relations between items.

    Sweet
    Sour
    The relation between sweet and sour
    title 1
    title 2
    title 3
    title 1
    title 2
    title 3
    title 4

    funnel chart

    Funnel chart
    Sliced chart
    Pyramid chart
    XY chart
    Sankey chart
    World map