\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{bharathlobby} \pdfinfo{ /Title (html.pdf) /Creator (Cheatography) /Author (bharathlobby) /Subject (html 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 Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{bharathlobby} via \textcolor{DarkBackground}{\uline{cheatography.com/171504/cs/36004/}}} \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}bharathlobby \\ \uline{cheatography.com/bharathlobby} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 10th December, 2022.\\ 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*}{4} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Basic HTML}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{\textless{}!DOCTYPE\textgreater{} - Defines the document type \newline % Row Count 1 (+ 1) \textless{}html\textgreater{} - Defines an HTML document \newline % Row Count 3 (+ 2) \textless{}head\textgreater{} - Contains metadata/information for the document \newline % Row Count 5 (+ 2) \textless{}title\textgreater{} - Defines a title for the document \newline % Row Count 7 (+ 2) \textless{}body\textgreater{} - Defines the document's body \newline % Row Count 8 (+ 1) \textless{}h1\textgreater{} to \textless{}h6\textgreater{} - Defines HTML headings \newline % Row Count 9 (+ 1) \textless{}p\textgreater{} - Defines a paragraph \newline % Row Count 10 (+ 1) \textless{}br\textgreater{} - Inserts a single line break \newline % Row Count 11 (+ 1) \textless{}hr\textgreater{} - Defines a thematic change in the content \newline % Row Count 12 (+ 1) \textless{}!-{}-...-{}-\textgreater{} - Defines a comment% Row Count 13 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Format Tags}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{\textless{}abbr\textgreater{} - Defines an abbreviation or an acronym \newline % Row Count 1 (+ 1) \textless{}address\textgreater{} - Defines contact information for the author/owner of a document/article \newline % Row Count 3 (+ 2) \textless{}b\textgreater{} - Defines bold text \newline % Row Count 4 (+ 1) \textless{}bdi\textgreater{} - Isolates a part of text that might be formatted in a different direction from other text outside it \newline % Row Count 7 (+ 3) \textless{}bdo\textgreater{} - Overrides the current text direction \newline % Row Count 8 (+ 1) \textless{}blockquote\textgreater{} - Defines a section that is quoted from another source \newline % Row Count 10 (+ 2) \textless{}cite\textgreater{} - Defines the title of a work \newline % Row Count 11 (+ 1) \textless{}code\textgreater{} - Defines a piece of computer code \newline % Row Count 12 (+ 1) \textless{}del\textgreater{} - Defines text that has been deleted from a document \newline % Row Count 14 (+ 2) \textless{}dfn\textgreater{} - Specifies a term that is going to be defined within the content \newline % Row Count 16 (+ 2) \textless{}em\textgreater{} - Defines emphasized text  \newline % Row Count 17 (+ 1) \textless{}i\textgreater{} - Defines a part of text in an alternate voice or mood \newline % Row Count 19 (+ 2) \textless{}ins\textgreater{} - Defines a text that has been inserted into a document \newline % Row Count 21 (+ 2) \textless{}kbd\textgreater{} - Defines keyboard input \newline % Row Count 22 (+ 1) \textless{}mark\textgreater{} - Defines marked/highlighted text \newline % Row Count 23 (+ 1) \textless{}meter\textgreater{} - Defines a scalar measurement within a known range (a gauge) \newline % Row Count 25 (+ 2) \textless{}pre\textgreater{} - Defines preformatted text \newline % Row Count 26 (+ 1) \textless{}progress\textgreater{} - Represents the progress of a task \newline % Row Count 27 (+ 1) \textless{}q\textgreater{} - Defines a short quotation \newline % Row Count 28 (+ 1) \textless{}rp\textgreater{} - Defines what to show in browsers that do not support ruby annotations \newline % Row Count 30 (+ 2) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Format Tags (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{\textless{}rt\textgreater{} - Defines an \seqsplit{explanation/pronunciation} of characters (for East Asian typography) \newline % Row Count 2 (+ 2) \textless{}ruby\textgreater{} - Defines a ruby annotation (for East Asian typography) \newline % Row Count 4 (+ 2) \textless{}s\textgreater{} - Defines text that is no longer correct \newline % Row Count 5 (+ 1) \textless{}samp\textgreater{} - Defines sample output from a computer program \newline % Row Count 7 (+ 2) \textless{}small\textgreater{} - Defines smaller text \newline % Row Count 8 (+ 1) \textless{}strong\textgreater{} - Defines important text \newline % Row Count 9 (+ 1) \textless{}sub\textgreater{} - Defines subscripted text \newline % Row Count 10 (+ 1) \textless{}sup\textgreater{} - Defines superscripted text \newline % Row Count 11 (+ 1) \textless{}template\textgreater{} - Defines a container for content that should be hidden when the page loads \newline % Row Count 13 (+ 2) \textless{}time\textgreater{} - Defines a specific time (or datetime) \newline % Row Count 14 (+ 1) \textless{}u\textgreater{} - Defines some text that is unarticulated and styled differently from normal text \newline % Row Count 16 (+ 2) \textless{}var\textgreater{} - Defines a variable \newline % Row Count 17 (+ 1) \textless{}wbr\textgreater{} - Defines a possible line-break% Row Count 18 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Forms \& Input Tags}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{\textless{}form\textgreater{} - Defines an HTML form for user input \newline % Row Count 1 (+ 1) \textless{}input\textgreater{} - Defines an input control \newline % Row Count 2 (+ 1) \textless{}textarea\textgreater{} - Defines a multiline input control (text area) \newline % Row Count 4 (+ 2) \textless{}button\textgreater{} - Defines a clickable button \newline % Row Count 5 (+ 1) \textless{}select\textgreater{} - Defines a drop-down list \newline % Row Count 6 (+ 1) \textless{}optgroup\textgreater{} - Defines a group of related options in a drop-down list \newline % Row Count 8 (+ 2) \textless{}option\textgreater{} - Defines an option in a drop-down list \newline % Row Count 9 (+ 1) \textless{}label\textgreater{} - Defines a label for an \textless{}input\textgreater{} element \newline % Row Count 10 (+ 1) \textless{}fieldset\textgreater{} - Groups related elements in a form \newline % Row Count 11 (+ 1) \textless{}legend\textgreater{} - Defines a caption for a \textless{}fieldset\textgreater{} element \newline % Row Count 13 (+ 2) \textless{}datalist\textgreater{} - Specifies a list of pre-defined options for input controls \newline % Row Count 15 (+ 2) \textless{}output\textgreater{} - Defines the result of a calculation% Row Count 16 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Link Tags}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{\textless{}a\textgreater{} - Defines a hyperlink \newline % Row Count 1 (+ 1) \textless{}link\textgreater{} - Defines the relationship between a document and an external resource \newline % Row Count 3 (+ 2) \textless{}nav\textgreater{} - Defines navigation links% Row Count 4 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{List Tags}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{\textless{}ul\textgreater{} - Defines an unordered list \newline % Row Count 1 (+ 1) \textless{}ol\textgreater{} - Defines an ordered list \newline % Row Count 2 (+ 1) \textless{}li\textgreater{} - Defines a list item \newline % Row Count 3 (+ 1) \textless{}dir\textgreater{} - Defines a directory list \newline % Row Count 4 (+ 1) \textless{}dl\textgreater{} - Defines a description list \newline % Row Count 5 (+ 1) \textless{}dt\textgreater{} - Defines a term/name in a description list \newline % Row Count 6 (+ 1) \textless{}dd\textgreater{} - Defines a description of a term/name in a description list% Row Count 8 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Frame Tags}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{\textless{}frame\textgreater{} - Defines a frame in a frameset \newline % Row Count 1 (+ 1) \textless{}frameset\textgreater{} - Defines a set of frames \newline % Row Count 2 (+ 1) \textless{}noframes\textgreater{} - Defines an alternate content for users that do not support frames \newline % Row Count 4 (+ 2) \textless{}iframe\textgreater{} - Defines an inline frame% Row Count 5 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Image Tags}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{\textless{}img\textgreater{} - Defines an image \newline % Row Count 1 (+ 1) \textless{}map\textgreater{} - Defines a client-side image map \newline % Row Count 2 (+ 1) \textless{}area\textgreater{} - Defines an area inside an image map \newline % Row Count 3 (+ 1) \textless{}canvas\textgreater{} - Used to draw graphics, on the fly, via scripting (usually JavaScript) \newline % Row Count 5 (+ 2) \textless{}figcaption\textgreater{} - Defines a caption for a \textless{}figure\textgreater{} element \newline % Row Count 7 (+ 2) \textless{}figure\textgreater{} - Specifies self-contained content \newline % Row Count 8 (+ 1) \textless{}picture\textgreater{} - Defines a container for multiple image resources \newline % Row Count 10 (+ 2) \textless{}svg\textgreater{} - Defines a container for SVG graphics% Row Count 11 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Table Tags}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{\textless{}table\textgreater{} - Defines a table \newline % Row Count 1 (+ 1) \textless{}caption\textgreater{} - Defines a table caption \newline % Row Count 2 (+ 1) \textless{}th\textgreater{} - Defines a header cell in a table \newline % Row Count 3 (+ 1) \textless{}tr\textgreater{} - Defines a row in a table \newline % Row Count 4 (+ 1) \textless{}td\textgreater{} - Defines a cell in a table \newline % Row Count 5 (+ 1) \textless{}thead\textgreater{} - Groups the header content in a table \newline % Row Count 6 (+ 1) \textless{}tbody\textgreater{} - Groups the body content in a table \newline % Row Count 7 (+ 1) \textless{}tfoot\textgreater{} - Groups the footer content in a table \newline % Row Count 8 (+ 1) \textless{}col\textgreater{} - Specifies column properties for each column within a \textless{}colgroup\textgreater{} element \newline % Row Count 10 (+ 2) \textless{}colgroup\textgreater{} - Specifies a group of one or more columns in a table for formatting% Row Count 12 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Meta Tags}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{\textless{}head\textgreater{} - Defines information about the document \newline % Row Count 1 (+ 1) \textless{}meta\textgreater{} - Defines metadata about an HTML document \newline % Row Count 2 (+ 1) \textless{}base\textgreater{} - Specifies the base URL/target for all relative URLs in a document \newline % Row Count 4 (+ 2) \textless{}basefont\textgreater{} - Specifies a default color, size, and font for all text in a document% Row Count 6 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Audio / Video Tags}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{\textless{}audio\textgreater{} - Defines sound content \newline % Row Count 1 (+ 1) \textless{}source\textgreater{} - Defines multiple media resources for media elements (\textless{}video\textgreater{}, \textless{}audio\textgreater{} and \textless{}picture\textgreater{}) \newline % Row Count 3 (+ 2) \textless{}track\textgreater{} - Defines text tracks for media elements (\textless{}video\textgreater{} and \textless{}audio\textgreater{}) \newline % Row Count 5 (+ 2) \textless{}video\textgreater{} - Defines a video or movie% Row Count 6 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Style \& Semantic Tags}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{\textless{}style\textgreater{} - Defines style information for a document \newline % Row Count 2 (+ 2) \textless{}div\textgreater{} - Defines a section in a document \newline % Row Count 3 (+ 1) \textless{}span\textgreater{} - Defines a section in a document \newline % Row Count 4 (+ 1) \textless{}header\textgreater{} - Defines a header for a document or section \newline % Row Count 6 (+ 2) \textless{}footer\textgreater{} - Defines a footer for a document or section \newline % Row Count 8 (+ 2) \textless{}main\textgreater{} - Specifies the main content of a document \newline % Row Count 9 (+ 1) \textless{}section\textgreater{} - Defines a section in a document \newline % Row Count 10 (+ 1) \textless{}article\textgreater{} - Defines an article \newline % Row Count 11 (+ 1) \textless{}aside\textgreater{} - Defines content aside from the page content \newline % Row Count 13 (+ 2) \textless{}details\textgreater{} - Defines additional details that the user can view or hide \newline % Row Count 15 (+ 2) \textless{}dialog\textgreater{} - Defines a dialog box or window \newline % Row Count 16 (+ 1) \textless{}summary\textgreater{} - Defines a visible heading for a \textless{}details\textgreater{} element \newline % Row Count 18 (+ 2) \textless{}data\textgreater{} - Adds a machine-readable translation of a given content% Row Count 20 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Programming Tags}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{\textless{}script\textgreater{} - Defines a client-side script \newline % Row Count 1 (+ 1) \textless{}noscript\textgreater{} - Defines an alternate content for users that do not support client-side scripts \newline % Row Count 3 (+ 2) \textless{}applet\textgreater{} - Defines an embedded applet \newline % Row Count 4 (+ 1) \textless{}embed\textgreater{} - Defines a container for an external (non-HTML) application \newline % Row Count 6 (+ 2) \textless{}object\textgreater{} - Defines an embedded object \newline % Row Count 7 (+ 1) \textless{}param\textgreater{} - Defines a parameter for an object% Row Count 8 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}