\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{denish} \pdfinfo{ /Title (html-tags-quick-seo-and-accessibility-notes.pdf) /Creator (Cheatography) /Author (denish) /Subject (HTML tags - Quick SEO \& Accessibility Notes Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{A3A3A3} \definecolor{LightBackground}{HTML}{F3F3F3} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{HTML tags - Quick SEO \& Accessibility Notes Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{denish} via \textcolor{DarkBackground}{\uline{cheatography.com/215805/cs/47036/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}denish \\ \uline{cheatography.com/denish} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 18th September, 2025.\\ Updated 18th September, 2025.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{2} \begin{tabularx}{8.4cm}{x{1.6 cm} x{6.4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{100+ HTML tags sheet}} \tn % Row 0 \SetRowColor{LightBackground} \textless{}!DOCTYPE\textgreater{} & Declares the document type and HTML version; required at top of every HTML5 file. \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \textless{}html\textgreater{} & Root element that contains the entire HTML document. \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} \textless{}base\textgreater{} & Specifies the base URL for all relative URLs in the document \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} \textless{}head\textgreater{} & Container for metadata: title, links to scripts/styles, meta tags. \tn % Row Count 10 (+ 3) % Row 4 \SetRowColor{LightBackground} \textless{}title\textgreater{} & Sets the page title shown in browser tabs and search results. \tn % Row Count 12 (+ 2) % Row 5 \SetRowColor{white} \textless{}meta\textgreater{} & Defines metadata like charset, viewport, and SEO descriptions. \tn % Row Count 14 (+ 2) % Row 6 \SetRowColor{LightBackground} \textless{}style\textgreater{} & Holds internal CSS styles for the document. \tn % Row Count 16 (+ 2) % Row 7 \SetRowColor{white} \textless{}link\textgreater{} & Links external resources such as stylesheets or prefetch hints. \tn % Row Count 18 (+ 2) % Row 8 \SetRowColor{LightBackground} \textless{}script\textgreater{} & Embeds or references JavaScript code for interactivity. \tn % Row Count 20 (+ 2) % Row 9 \SetRowColor{white} \textless{}noscript\textgreater{} & Displays content when JavaScript is disabled in the browser \tn % Row Count 22 (+ 2) % Row 10 \SetRowColor{LightBackground} \textless{}template\textgreater{} & Holds HTML markup that is not rendered until cloned via JS. \tn % Row Count 24 (+ 2) % Row 11 \SetRowColor{white} \textless{}body\textgreater{} & Holds the visible content of the page. \tn % Row Count 26 (+ 2) % Row 12 \SetRowColor{LightBackground} \textless{}header\textgreater{} & Represents introductory content or a set of navigational links. \tn % Row Count 28 (+ 2) % Row 13 \SetRowColor{white} \textless{}nav\textgreater{} & Defines a set of navigation links. \tn % Row Count 30 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{1.6 cm} x{6.4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{100+ HTML tags sheet (cont)}} \tn % Row 14 \SetRowColor{LightBackground} \textless{}main\textgreater{} & Specifies the main content of the document (unique landmark). \tn % Row Count 2 (+ 2) % Row 15 \SetRowColor{white} \textless{}article\textgreater{} & Represents a self-contained composition like a blog post. \tn % Row Count 4 (+ 2) % Row 16 \SetRowColor{LightBackground} \textless{}footer\textgreater{} & Contains footer information about its nearest section or page. \tn % Row Count 6 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{p{0.8 cm} x{7.2 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{HTML Heading tags}} \tn % Row 0 \SetRowColor{LightBackground} \textless{}h1\textgreater{} & Top-level heading, used for main titles. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \textless{}h2\textgreater{} & Second-level heading for subsections. \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \textless{}h3\textgreater{} & Third-level heading used for further subdivisions. \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \textless{}h4\textgreater{} & Heading for smaller subsections. \tn % Row Count 7 (+ 1) % Row 4 \SetRowColor{LightBackground} \textless{}h5\textgreater{} & Smaller heading; rarely used for major structure. \tn % Row Count 9 (+ 2) % Row 5 \SetRowColor{white} \textless{}h6\textgreater{} & Smallest heading level for fine-grained titles. \tn % Row Count 11 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.84 cm} x{6.16 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Text formatting and Listing HTML Tags}} \tn % Row 0 \SetRowColor{LightBackground} \textless{}ul\textgreater{} & Unordered list; items use bullets. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \textless{}li\textgreater{} & List item used inside ordered or unordered lists. \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \textless{}ol\textgreater{} & Ordered list; items are numbered. \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \textless{}dl\textgreater{} & Description list for name/value groups. \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} \textless{}dt\textgreater{} & Term/name in a description list. \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} \textless{}blockquote\textgreater{} & Represents a long quotation from another source. \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} \textless{}pre\textgreater{} & Preformatted text where whitespace and newlines are preserved. \tn % Row Count 15 (+ 3) % Row 7 \SetRowColor{white} \textless{}hr\textgreater{} & Thematic break; a horizontal rule used to separate content. \tn % Row Count 17 (+ 2) % Row 8 \SetRowColor{LightBackground} \textless{}br\textgreater{} & Line break inside text; forces a new line. \tn % Row Count 19 (+ 2) % Row 9 \SetRowColor{white} \textless{}p\textgreater{} & Paragraph element for blocks of text. \tn % Row Count 21 (+ 2) % Row 10 \SetRowColor{LightBackground} \textless{}b\textgreater{} & Stylistic element to render text as bold (presentational). \tn % Row Count 23 (+ 2) % Row 11 \SetRowColor{white} \textless{}i\textgreater{} & Italic text; for voice or offset text. \tn % Row Count 25 (+ 2) % Row 12 \SetRowColor{LightBackground} \textless{}strong\textgreater{} & Important text—semantically stronger than bold. \tn % Row Count 27 (+ 2) % Row 13 \SetRowColor{white} \textless{}em\textgreater{} & Emphasized text, typically rendered in italics. \tn % Row Count 29 (+ 2) % Row 14 \SetRowColor{LightBackground} \textless{}small\textgreater{} & Smaller text for fine print. \tn % Row Count 30 (+ 1) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{1.84 cm} x{6.16 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Text formatting and Listing HTML Tags (cont)}} \tn % Row 15 \SetRowColor{LightBackground} \textless{}s\textgreater{} & Strikethrough text to indicate removal or no longer accurate. \tn % Row Count 3 (+ 3) % Row 16 \SetRowColor{white} \textless{}mark\textgreater{} & Highlights text for reference or attention. \tn % Row Count 5 (+ 2) % Row 17 \SetRowColor{LightBackground} \textless{}u\textgreater{} & Underlined text; used for annotations or stylistic emphasis. \tn % Row Count 7 (+ 2) % Row 18 \SetRowColor{white} \textless{}sub\textgreater{} & Subscript text. \tn % Row Count 8 (+ 1) % Row 19 \SetRowColor{LightBackground} \textless{}sup\textgreater{} & Superscript text. \tn % Row Count 9 (+ 1) % Row 20 \SetRowColor{white} \textless{}wbr\textgreater{} & Word break opportunity for long, unbroken text. \tn % Row Count 11 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.6 cm} x{6.4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{HTML Table tags}} \tn % Row 0 \SetRowColor{LightBackground} \textless{}table\textgreater{} & Defines a table. \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \textless{}caption\textgreater{} & Table caption describing its conten \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} \textless{}colgroup\textgreater{} & Groups columns within a table for styling. \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} \textless{}col\textgreater{} & Defines column properties within a colgroup. \tn % Row Count 7 (+ 2) % Row 4 \SetRowColor{LightBackground} \textless{}thead\textgreater{} & Table header group containing header rows. \tn % Row Count 9 (+ 2) % Row 5 \SetRowColor{white} \textless{}tbody\textgreater{} & Table body group containing data rows. \tn % Row Count 11 (+ 2) % Row 6 \SetRowColor{LightBackground} \textless{}tfoot\textgreater{} & Table footer group; useful for summaries or totals. \tn % Row Count 13 (+ 2) % Row 7 \SetRowColor{white} \textless{}tr\textgreater{} & Table row that contains table cells. \tn % Row Count 15 (+ 2) % Row 8 \SetRowColor{LightBackground} \textless{}th\textgreater{} & Header cell in a table, usually bold and centered. \tn % Row Count 17 (+ 2) % Row 9 \SetRowColor{white} \textless{}td\textgreater{} & Standard data cell within a table row. \tn % Row Count 19 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.6 cm} x{6.4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{HTML Form tags}} \tn % Row 0 \SetRowColor{LightBackground} \textless{}form\textgreater{} & Container for interactive controls to submit data. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \textless{}legend\textgreater{} & Caption for a fieldset describing the grouped controls. \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \textless{}fieldset\textgreater{} & Groups related form controls. \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \textless{}button\textgreater{} & Clickable button used to submit or trigger actions. \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} \textless{}select\textgreater{} & Drop-down list for selecting one (or multiple) options. \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} \textless{}input\textgreater{} & Single-line form control for text, checkboxes, radios, etc. \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} \textless{}label\textgreater{} & Labels a form control for accessibility and usability. \tn % Row Count 14 (+ 2) % Row 7 \SetRowColor{white} \textless{}datalist\textgreater{} & Provides autocomplete options for an input. \tn % Row Count 16 (+ 2) % Row 8 \SetRowColor{LightBackground} \textless{}textarea\textgreater{} & Multi-line text input control. \tn % Row Count 18 (+ 2) % Row 9 \SetRowColor{white} \textless{}option\textgreater{} & Represents an option in a select control \tn % Row Count 20 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.84 cm} x{6.16 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Video, Image related tags}} \tn % Row 0 \SetRowColor{LightBackground} \textless{}img\textgreater{} & Embeds an image; use src and alt attributes. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \textless{}picture\textgreater{} & Container for multiple source elements for responsive images. \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} \textless{}figcaption\textgreater{} & Caption or legend for a figure element. \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} \textless{}figure\textgreater{} & Self-contained content, often with an image and caption. \tn % Row Count 9 (+ 2) % Row 4 \SetRowColor{LightBackground} \textless{}source\textgreater{} & Specifies multiple media resources for picture, audio, or video. \tn % Row Count 12 (+ 3) % Row 5 \SetRowColor{white} \textless{}canvas\textgreater{} & Bitmap drawing area for scriptable graphics. \tn % Row Count 14 (+ 2) % Row 6 \SetRowColor{LightBackground} \textless{}area\textgreater{} & Defines a clickable area inside an image map. \tn % Row Count 16 (+ 2) % Row 7 \SetRowColor{white} \textless{}picture\textgreater{} & Container for multiple source elements for responsive images. \tn % Row Count 19 (+ 3) % Row 8 \SetRowColor{LightBackground} \textless{}map\textgreater{} & Defines an image map with clickable areas. \tn % Row Count 21 (+ 2) % Row 9 \SetRowColor{white} \textless{}video\textgreater{} & Embeds video content with playback controls. \tn % Row Count 23 (+ 2) % Row 10 \SetRowColor{LightBackground} \textless{}track\textgreater{} & Specifies timed text tracks like captions/subtitles for media. \tn % Row Count 26 (+ 3) % Row 11 \SetRowColor{white} \textless{}audio\textgreater{} & Embeds sound content with playback controls. \tn % Row Count 28 (+ 2) % Row 12 \SetRowColor{LightBackground} \textless{}embed\textgreater{} & Embeds external content like plugins or media. \tn % Row Count 30 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{1.84 cm} x{6.16 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Video, Image related tags (cont)}} \tn % Row 13 \SetRowColor{LightBackground} \textless{}iframe\textgreater{} & Embeds another HTML page within the current page. \tn % Row Count 2 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.44 cm} x{6.56 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Other HTML tags}} \tn % Row 0 \SetRowColor{LightBackground} \textless{}dialog\textgreater{} & Dialog box or window for user interactions \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \textless{}slot\textgreater{} & Placeholder inside web components where content is inserted. \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \textless{}bdi\textgreater{} & Isolates text directionality for mixed-direction content. \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \textless{}bdo\textgreater{} & Explicitly overrides the current text direction. \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} \textless{}ruby\textgreater{} & Container for ruby annotations used in East Asian typography. \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} \textless{}rt\textgreater{} & Ruby text providing pronunciation or short annotations \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} \textless{}rp\textgreater{} & Parenthesis for browsers that don't support ruby annotations \tn % Row Count 14 (+ 2) % Row 7 \SetRowColor{white} \textless{}portal\textgreater{} & Experimental element for teleporting a browsing context. \tn % Row Count 16 (+ 2) % Row 8 \SetRowColor{LightBackground} \textless{}command\textgreater{} & Deprecated element historically used for commands or buttons. \tn % Row Count 18 (+ 2) % Row 9 \SetRowColor{white} \textless{}isindex\textgreater{} & Obsolete single-line input element (do not use). \tn % Row Count 20 (+ 2) % Row 10 \SetRowColor{LightBackground} \textless{}bgsound\textgreater{} & Obsolete; used for background sound in legacy browsers. \tn % Row Count 22 (+ 2) % Row 11 \SetRowColor{white} \textless{}acronym\textgreater{} & Obsolete; use \textless{}abbr\textgreater{} instead \tn % Row Count 24 (+ 2) % Row 12 \SetRowColor{LightBackground} \textless{}data\textgreater{} & Associates machine-readable data with human-readable content. \tn % Row Count 26 (+ 2) % Row 13 \SetRowColor{white} \textless{}summary\textgreater{} & Summary or label for a details widget. \tn % Row Count 28 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}