Skip to main content

Tags

Semantic Elements in HTML5

Semantic HTML elements clearly describe it's meaning in a human and machine readable way. Elements such as <header>, <footer> and <article> are all considered semantic because they accurately describe the purpose of the element and the type of content that is inside them.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element

HTML Tags Ordered by Category

# = New in HTML5

## no-user-select - no option to select text

Basic HTML

TagDescription
<!DOCTYPE>Defines the document type
<html>Defines an HTML document
<head>Defines information about 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

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

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
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

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> #Links the given content with a machine-readable translation