An HTML tag is usually defined as a character set that provides a formatted command for a web page. Tags provide directions for visual content.
In early times, HTML tags were responsible for the most part of web code. However, today their importance has decreased.
HTML tags include tags for headlines or titles, tags for tables, tags for references, etc. An HTML tag has a tag name written in angular brackets. It can appear in pairs indicating the beginning and ending tag that frames a text, a certain piece of code, or other tags. The beginning tag consists of a name which can be followed by one or more attributes. The ending tag consists of the same name which is preceded by a forward-slash ("/").
Below you can find a table of HTML tags with short descriptions.
Basic Tags
Tag | Description |
---|---|
<!DOCTYPE> | Sets the type of the document. |
<html> | Sets an HTML document. |
<head> | Contains general information (metadata) about the document. |
<title> | Sets a title of the document. |
<body> | Specifies the body of the document. |
<h1> to <h6> | Defines HTML headings. |
<p> | Defines a paragraph. |
<br> | Specifies a line break. |
<hr> | Inserts a horizontal line or defines a thematic break. |
<!-- ... --> | Defines a comment. |
Formatting Tags
Formatting tags are used for visual styling and emphasizing the fragments of text.
Tag | Descriptions |
---|---|
<acronym> | Defines acronyms. Not supported in HTML5. The <abbr> tag is used instead. |
<abbr> | Defines abbreviation or acronym. |
<address> | Specifies contact information for the author/owner of a document/article. |
<b> | Displays text in a bold style. |
<bdi> | Isolates a text fragment from its surrounding for the purposes of bidirectional text formatting. New element in HTML5. |
<bdo> | Overrides the current text direction. |
<big> | Displays text in a bigger size. Not supported in HTML5․ CSS styles are used instead. |
<blockquote> | Defines a long citation. |
<center> | Displays text as centered. Not supported in HTML5․ CSS styles are used instead. |
<cite> | Describe a reference (title, author, or the URL) to a cited creative work. |
<code> | Defines a fragment of a computer code. |
<del> | Specifies deleted text. |
<dfn> | Sets a definition of a term in italic. |
<em> | Specifies an emphasized text. |
<font> | Sets font, color and size of the text. Not supported in HTML5․ CSS styles are used instead. |
<i> | Displays text in italic. |
<ins> | Defines a text inserted into a document. |
<kbd> | Specifies keyboard input. |
<mark> | Contains a marked/highlighted text. New element in HTML5. |
<meter> | Defines a scalar measurement within a known range (a gauge). |
<pre> | Defines a preformatted text. |
<progress> | Indicates the completion progress of a task (progress bar).
New element in HTML5. |
<q> | Defines a short quotation. |
<rp> | Contains an alternative text to be shown in browsers that do not support the <ruby> text. New element in HTML5. |
<rt> | Defines the pronunciation of character presented in a ruby annotations (for East Asian typography).
New element in HTML5. |
<ruby> |
Represents a ruby annotation (for East Asian typography). New element in HTML5. |
<s> | Displays a text that is no longer correct in strikethrough style. |
<samp> | Sets sample output from a computer program. |
<small> | Displays text in a smaller size. |
<strike> | Defines text in strikethrough style.
Not supported in HTML5. The <del> or <s> tags are used instead. |
<strong> | Defines strongly emphasized text. |
<sub> | Defines subscripted text. |
<sup> | Defines superscripted text. |
<template> | Defines a template. New element in HTML5. |
<time> | Defines a date/time. New element in HTML5. |
<tt> | Displays text in a teletype style. Not supported in HTML5. CSS styles are used instead. |
<u> | Displays text stylistically different from normal text as underlined. |
<var> | Defines a variable. |
<wbr> | Defines a possible line-break. New element in HTML5. |
Form Tags
Tag | Description |
---|---|
<form> | Specifies an HTML form for user input. |
<input> | Defines an input control. |
<textarea> | Sets a multi-line text input control (text area). |
<button> | Defines a clickable button inside an HTML form. |
<select> | Defines a selection list within a form. |
<optgroup> | Groups related options in a selection list. |
<option> | Defines an option in a selection list. |
<label> | Sets a label for an <input> element. |
<fieldset> | Groups related elements in a form. |
<legend> | Sets a title for an <fieldset> element. |
<datalist> | Contains a set of pre-defined options for an <input> element.
New element in HTML5. |
<keygen> | Generates a public-private key pair for encoding/decoding data of the form. New element in HTML5. |
<output> | Defines the result of a calculation. New element in HTML5. |
Frames Tags
Tag | Description |
---|---|
<frame> | Specifies a single frame within a frameset.
Not supported in HTML5․ |
<frameset> | Specifies a set of frames. Not supported in HTML5․ |
<noframes> | Contains an alternate content to be displayed in browsers that do not support frames. Not supported in HTML5․ |
<iframe> | Displays a URL in an inline frame. |
Image Tags
Tag | Description |
---|---|
<img> | Specifies an image. |
<map> | Specifies a client-side image-map. |
<area> | Defines an interactive area inside an image-map. |
<canvas> | Defines an area in the document, where one can draw graphics on the fly via scripting (usually JavaScript).
New element in HTML5. |
<figcaption> | Defines a title of a <figure> element. New element in HTML5. |
<figure> | Defines a self-contained content. New element in HTML5. |
<picture> | Container for multiple image resources specified within <source> elements. New element in HTML5. |
<svg> | Container for SVG graphics. New element in HTML5. |
Audio/Video Tags
Tag | Description |
---|---|
<audio> | Defines audio content. New element in HTML5. |
<source> | Contains alternative media resources for the media elements like <video> or <audio>. New element in HTML5. |
<track> | Contains text track for the media elements (<video> and <audio>). New element in HTML5. |
<video> | Defines video content. New element in HTML5. |
Link Tags
Tag | Description |
---|---|
<a> | Defines a hyperlink. |
<link> | Sets the relationship between the current document and an external resource (usually external CSS stylesheet). |
<nav> | Defines navigation links. New element in HTML5. |
List Tags
Tag | Description |
---|---|
<ul> | Defines an unordered list. |
<ol> | Defines an ordered list. |
<li> | Defines a list item. |
<dir> | Defines a directory list. Not supported in HTML5 |
<dl> | Defines a definition list. |
<dt> | Defines a term/item in a definition list. |
<dd> | Defines a definition for a term in a definition list. |
<menu> | Defines a list of commands/context menu. |
<menuitem> | Defines an item in context menu.
New element in HTML5. |
Table Tags
Tag | Description |
---|---|
<table> | Defines a table. |
<caption> | Defines a title of the table. |
<th> | Defines a header cell in a table. |
<tr> | Defines a row of cells in a table. |
<td> | Defines a cell in a table. |
<thead> | Groups a set of rows that describes the column labels of a table. |
<tbody> | Groups a set of rows defining the main body of the table data. |
<tfoot> | Defines a footer of a table. |
<col> | Defines values for one or more columns in a <colgroup> element. |
<colgroup> | Specifies a group of one or more columns in a table for formatting. |
Styling and Semantic Tags
Tag | Description |
---|---|
<style> | Contains style information (commonly CSS). |
<div> | Defines a division or a section in a document. |
<span> | Defines an inline styleless section in a document. |
<header> | Defines a header cell in a table.
New element in HTML5. |
<footer> | Defines the footer of a document or a section.
New element in HTML5. |
<main> | Specifies the main content of a document.
New element in HTML5. |
<section> | Defines a section of a document (header, footer etc.).
New element in HTML5. |
<article> | Defines an article. New element in HTML5. |
<aside> | Defines a section, which contains information loosely related to the page content. New element in HTML5. |
<details> | Contains additional details that the user can view or hide.
New element in HTML5. |
<dialog> | Defines a dialog box or window.
New element in HTML5. |
<data> | Defines a machine-readable translation of the content.
New element in HTML5. |
<summary> | Defines a summary for the <details> element.
New element in HTML5. |
Metadata Tags
Tag | Description |
---|---|
<head> | Contains technical information about the document, which is not displayed to the user. |
<meta> | Contains meta data of the document. |
<base> | Defines the base (absolute) URL for all linked objects on a page. |
<basefont> | Specifies the base font, size and color for a text.
Not supported in HTML5. |
Scripting and Programming Tags
Tag | Description |
---|---|
<script> | Contains script in the document for client-side processing. |
<noscript> | Defines an alternate content to be displayed in browsers that do not support scripts. |
<applet> | Specifies an embedded applet. Not supported in HTML5. |
<embed> | Contains external application, typically multimedia content like audio or video embedded in an HTML document. |
<object> | Defines an embedded object (video, Flash, applets, images, etc.). |
<param> | Defines a parameter for an object or applet element. |
Practice Your Knowledge
Quiz Time: Test Your Skills!
Ready to challenge what you've learned? Dive into our interactive quizzes for a deeper understanding and a fun way to reinforce your knowledge.