Semantic HTML cheat sheet
Semantic HTML cheat sheet
Sectioning Tags
<header>: The header of a content section or the web page, often containing branding or
logos.
<footer>: The footer of a content section or the web page, typically containing secondary
links, copyright notices, and policies.
<h1> to <h6>: Headings on the web page, with <h1> being the most important and <h6> the
least important.
Content Tags
Inline Tags
<a>: An anchor link to another HTML document.
<b>: Bolds the containing text. When used to indicate importance, use <strong> instead.
<cite>: Defines the title of creative work (e.g., a book, poem, song, movie, painting, or
sculpture). The text in the <cite> element is usually rendered in italics.
<i>: The containing text is displayed in italics. Used to indicate idiomatic text or technical
terms.
<s>: Displays the containing text with a strikethrough or line through it.
<small>: Used to represent small text, such as copyright and legal text.
<sub>: The containing text is subscript text, displayed with a lowered baseline.
<sup>: The containing text is superscript text, displayed with a raised baseline.
<object>: Similar to <embed> but the content is provided by a web browser plug-in.
<picture>: An element that contains one <img> element and one or more <source> elements
to offer alternative images for different displays/devices.
<source>: Specifies media resources for <picture>, <audio>, and <video> elements.
Table Tags
<table>: Defines a table element to display table data within a web page.
<thead>: Represents the header content of a table. Typically contains one <tr> element.
<tbody>: Represents the main content of a table. Contains one or more <tr> elements.
<tfoot>: Represents the footer content of a table. Typically contains one <tr> element.
<tr>: Represents a row in a table. Contains one or more <td> elements when used
within <tbody> or <tfoot>. When used within <thead>, contains one or more <th> elements.
<td>: Represents a cell in a table. Contains the text content of the cell.
<th>: Defines a header cell of a table. Contains the text content of the header.
<colgroup>: Defines a semantic group of one or more columns in a table for formatting.