Formatting
| Tag | Description | Example |
|---|---|---|
<abbr> |
Defines an abbreviation or acronym | |
<address> |
Contact information for author/owner | 123 Web St. HTML City |
<b> |
Bold text | Bold |
<bdi> |
Isolates text with different direction | hello أهلاً |
<bdo> |
Overrides text direction | Reversed |
<blockquote> |
Section quoted from another source | Quoted text |
<cite> |
Title of a work | w3schools |
<code> |
Computer code | console.log("hello") |
<del> |
Deleted text | |
<dfn> |
Term being defined | HTML |
<em> |
Emphasized text | Important |
<i> |
Alternate voice or mood | Italic |
<ins> |
Inserted text | Added |
<kbd> |
Keyboard input | Ctrl + C |
<mark> |
Highlighted text | Highlighted |
<meter> |
Scalar measurement | |
<pre> |
Preformatted text | line 1 |
<progress> |
Task progress | |
<q> |
Short quotation | Hello |
<rp> |
Fallback for ruby | 嗨 |
<rt> |
Ruby pronunciation | 嗨 |
<ruby> |
Ruby annotation | 嗨 |
<s> |
Incorrect text | |
<samp> |
Sample output | Output text |
<small> |
Smaller text | Small |
<strong> |
Important text | Strong |
<sub> |
Subscript | H2O |
<sup> |
Superscript | x2 |
<template> |
Hidden template content | Hidden |
<time> |
Time or datetime | |
<u> |
Underlined text | Underlined |
<var> |
Variable | x = 10 |
<wbr> |
Possible line break | super |
Forms and Input
| Tag | Description | Example |
|---|---|---|
<form> |
HTML form | |
<input> |
Input control | |
<textarea> |
Multiline input | |
<button> |
Clickable button | |
<select> |
Drop‑down list | |
<optgroup> |
Group of related options | |
<option> |
Option in list | |
<label> |
Label for input | |
<fieldset> |
Groups form elements | |
<legend> |
Caption for fieldset | |
<datalist> |
Predefined options | |
<output> |
Calculation result |
Links
| Tag | Description | Example |
|---|---|---|
<a> |
Hyperlink | Link |
<nav> |
Navigation links |
Lists
| Tag | Description | Example |
|---|---|---|
<menu> |
Alternative unordered list | |
<ul> |
Unordered list |
|
<ol> |
Ordered list |
|
<li> |
List item | |
<dl> |
Description list |
|
<dt> |
Term/name | |
<dd> |
Description |
Tables *
| Tag | Description | Example | |
|---|---|---|---|
<table> |
Table |
|
|
<caption> |
Table caption | ||
<th> |
Header cell |
|
|
<tr> |
Table row | ||
| A | |||
<td> |
Table cell | Cell | |
<thead> |
Table header group |
|
|
<tbody> |
Table body group | ||
| A | |||
<tfoot> |
Table footer group | ||
| F | |||
<col> |
Column properties | ||
<colgroup> |
Group of columns |
Semantics
| Tag | Description | Example |
|---|---|---|
<div> |
Section/block | Block |
<span> |
Inline section | Inline |
<header> |
Header | |
<hgroup> |
Header group | AB |
<footer> |
Footer | |
<main> |
Main content | |
<section> |
Section | |
<search> |
Search section | |
<article> |
Article | |
<aside> |
Aside content | |
<details> |
Expandable details | MoreHidden |
<dialog> |
Dialog box | |
<summary> |
Summary heading |


