\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{lmaes} \pdfinfo{ /Title (html-5-cheat-sheet.pdf) /Creator (Cheatography) /Author (lmaes) /Subject (HTML 5 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}{1782A3} \definecolor{LightBackground}{HTML}{F0F7F9} \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 5 Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{lmaes} via \textcolor{DarkBackground}{\uline{cheatography.com/23554/cs/5227/}}} \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}lmaes \\ \uline{cheatography.com/lmaes} \\ \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 13th May, 2016.\\ 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{2.08 cm} x{5.92 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Basis HTML}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{\textless{}!DOCTYPE html\textgreater{}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \textless{}html\textgreater{} & Wortel van HTML document \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \textless{}head\textgreater{} & Bepaalt de informatie van een document \tn % Row Count 4 (+ 2) % Row 3 \SetRowColor{white} \textless{}title\textgreater{} & Bepaalt de titel van het document \{\{nl\}\} (binnen de \textless{}head\textgreater{}) \tn % Row Count 7 (+ 3) % Row 4 \SetRowColor{LightBackground} \textless{}body\textgreater{} & Bepaalt de inhoud van het document \tn % Row Count 9 (+ 2) % Row 5 \SetRowColor{white} \textless{}h1\textgreater{} .... \textless{}h6\textgreater{} & Koppen van het document. \tn % Row Count 11 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.68 cm} x{6.32 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Semantische inhoud}} \tn % Row 0 \SetRowColor{LightBackground} \textless{}style\textgreater{} & Stijl bepaling in header \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \textless{}div\textgreater{} & Divisie (sectie) in pagina \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \textless{}span\textgreater{} & Inline sectie \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \textless{}header\textgreater{} & Header sectie \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} \textless{}footer\textgreater{} & Footer sectie \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} \textless{}main\textgreater{} & Hoofdcontent van een pagina \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} \textless{}section\textgreater{} & Sectie op een pagina \tn % Row Count 8 (+ 2) % Row 7 \SetRowColor{white} \textless{}article\textgreater{} & Artikel sectie \tn % Row Count 10 (+ 2) % Row 8 \SetRowColor{LightBackground} \textless{}aside\textgreater{} & Sidebar sectie (vb zij menu) \tn % Row Count 11 (+ 1) % Row 9 \SetRowColor{white} \textless{}details\textgreater{} & Extra detail sectie (uitklapbaar) \tn % Row Count 13 (+ 2) % Row 10 \SetRowColor{LightBackground} \textless{}dialog\textgreater{} & Dialoog box of window \tn % Row Count 14 (+ 1) % Row 11 \SetRowColor{white} \textless{}summary\textgreater{} & Visuele heading voor \textless{}details\textgreater{} \tn % Row Count 16 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.36 cm} x{6.64 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Nadruk}} \tn % Row 0 \SetRowColor{LightBackground} \textless{}strong\textgreater{} & Belangrijke elementen (nadruk) \{\{nl\}\} standaard bold \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \textless{}em\textgreater{} & Benadrukte elementen \{\{nl\}\} standaard cursief \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \textless{}small\textgreater{} & Kleine tekst \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \textless{}mark\textgreater{} & Gemarkeerde tekst \tn % Row Count 7 (+ 1) % Row 4 \SetRowColor{LightBackground} \textless{}del\textgreater{} & Gewiste / doorhaalde tekst \tn % Row Count 8 (+ 1) % Row 5 \SetRowColor{white} \textless{}ins\textgreater{} & Ingevoegde tekst \tn % Row Count 9 (+ 1) % Row 6 \SetRowColor{LightBackground} \textless{}sub\textgreater{} & Tekst in subscript \tn % Row Count 10 (+ 1) % Row 7 \SetRowColor{white} \textless{}sup\textgreater{} & Tekst in superscript \tn % Row Count 11 (+ 1) \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}{Afbeeldingen}} \tn % Row 0 \SetRowColor{LightBackground} \textless{}img\textgreater{} & Definieert een afbeelding \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \textless{}map\textgreater{} & Definieert een client-side image-map, met \{\{nl\}\}clickable area's \tn % Row Count 4 (+ 3) % Row 2 \SetRowColor{LightBackground} \textless{}area\textgreater{} & Definieert een gebied binnen een image-map \{\{nl\}\}(\textless{}map\textgreater{}) \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \textless{}canvas\textgreater{} & Definieert een gebied waarbinnen afbeeldingen \{\{nl\}\} kunnen worden getekend via scripts \tn % Row Count 9 (+ 3) % Row 4 \SetRowColor{LightBackground} \textless{}figure\textgreater{} & Definieert een op zichzelf staande inhoud \{\{nl\}\} bij een afbeelding \tn % Row Count 12 (+ 3) % Row 5 \SetRowColor{white} \textless{}figcaption\textgreater{} & Definieert een bijschrift voor een \textless{}figure\textgreater{} \tn % Row Count 14 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.36 cm} x{6.64 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Geluid en beeld}} \tn % Row 0 \SetRowColor{LightBackground} \textless{}audio\textgreater{} & Definieert geluid inhoud \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \textless{}source\textgreater{} & Definieert meerdere media bronnen voor media \{\{nl\}\}elementen \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \textless{}track\textgreater{} & Definieert tekst tracks voor media elementen,\{\{nl\}\} zoals ondertitels \tn % Row Count 7 (+ 3) % Row 3 \SetRowColor{white} \textless{}video\textgreater{} & Definieert een video of film \tn % Row Count 9 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{p{1.04 cm} x{6.96 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Links}} \tn % Row 0 \SetRowColor{LightBackground} \textless{}a\textgreater{} & Bepaalt hyperlink \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \textless{}link\textgreater{} & Bepaalt relatie tussen document en \{\{nl\}\}externe bron, zoals een stylesheet \tn % Row Count 4 (+ 3) % Row 2 \SetRowColor{LightBackground} \textless{}nav\textgreater{} & Bepaalt een reeks van navigatie links, \{\{nl\}\} zoals een menu \tn % Row Count 6 (+ 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}{Lijsten}} \tn % Row 0 \SetRowColor{LightBackground} \textless{}ul\textgreater{} & Unordered list (ongeordend) \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \textless{}ol\textgreater{} & Ordered list (genummerd) \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \textless{}li\textgreater{} & List item, onderdeel van een lijst \tn % Row Count 4 (+ 2) % Row 3 \SetRowColor{white} \textless{}dl\textgreater{} & Description list, met termen en beschrijvingen \tn % Row Count 6 (+ 2) % Row 4 \SetRowColor{LightBackground} \textless{}dt\textgreater{} & Term of naam van description list \tn % Row Count 8 (+ 2) % Row 5 \SetRowColor{white} \textless{}dd\textgreater{} & Beschrijving van term/naam \tn % Row Count 9 (+ 1) % Row 6 \SetRowColor{LightBackground} \textless{}datalist\textgreater{} & Lijst met vooraf gedefinieerde opties voor \{\{nl\}\} input element \tn % Row Count 11 (+ 2) % Row 7 \SetRowColor{white} \textless{}menu\textgreater{} & Menu of lijst met acties in een popup menu \{\{nl\}\}(enkel Firefox) \tn % Row Count 13 (+ 2) % Row 8 \SetRowColor{LightBackground} \textless{}menuitem\textgreater{} & Commando / menu item dat de gebruiker \{\{nl\}\}kan inroepen \tn % Row Count 15 (+ 2) % Row 9 \SetRowColor{white} \textless{}select\textgreater{} & Drop down lijst met opties \tn % Row Count 16 (+ 1) \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}{Tabellen}} \tn % Row 0 \SetRowColor{LightBackground} \textless{}table\textgreater{} & Bepaalt HTML tabel \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \textless{}tr\textgreater{} & Bepaalt tabelrij \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \textless{}th\textgreater{} & Bepaalt tabelheader / titel per rij \tn % Row Count 4 (+ 2) % Row 3 \SetRowColor{white} \textless{}td\textgreater{} & Bepaalt tabelcel (Table Data) \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} \textless{}thead\textgreater{} & Bepaalt header content in tabel \tn % Row Count 6 (+ 1) % Row 5 \SetRowColor{white} \textless{}tbody\textgreater{} & Bepaalt body content in tabel \tn % Row Count 7 (+ 1) % Row 6 \SetRowColor{LightBackground} \textless{}tfoot\textgreater{} & Bepaalt footer content in tabel \tn % Row Count 8 (+ 1) % Row 7 \SetRowColor{white} \textless{}caption\textgreater{} & Bepaalt onderschrift of beschrijving \tn % Row Count 10 (+ 2) % Row 8 \SetRowColor{LightBackground} \textless{}colgroup\textgreater{} & Specifieert groep van kolommen in tabel \{\{nl\}\} voor opmaak \tn % Row Count 12 (+ 2) % Row 9 \SetRowColor{white} \textless{}col\textgreater{} & Specifieert kolomeigenschappen voor \{\{nl\}\} elke kolom in \textless{}colgroup\textgreater{} \tn % Row Count 15 (+ 3) \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}{Formulieren}} \tn % Row 0 \SetRowColor{LightBackground} \textless{}form\textgreater{} & Bepaalt een HTML formulier \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \textless{}input\textgreater{} & Bepaalt een input veld. \{\{nl\}\}Soort wordt bepaald door type \{\{nl\}\} text - normaal tekstveld \{\{nl\}\} radio - selecteren van 1 optie \{\{nl\}\} checkbox - selectie meerdere opties \{\{nl\}\} submit - submit knop \tn % Row Count 8 (+ 7) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{\textless{}select\textgreater{}} \tn % Row Count 9 (+ 1) % Row 3 \SetRowColor{white} \textless{}fieldset\textgreater{} & Groepeert gerelateerde elementen \tn % Row Count 11 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{p{1.04 cm} x{6.96 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Meta info}} \tn % Row 0 \SetRowColor{LightBackground} \textless{}head\textgreater{} & Bevat alle pagina informatie \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \textless{}meta\textgreater{} & Meta informatie over de pagina \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \textless{}base\textgreater{} & bepaling van de basis URL van de pagina \tn % Row Count 6 (+ 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}{Programmering}} \tn % Row 0 \SetRowColor{LightBackground} \textless{}script\textgreater{} & Client-side programmering \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \textless{}noscript\textgreater{} & Alternatieve content voor gebruikers die\{\{nl\}\} geen clien-side scripts toelaten \tn % Row Count 4 (+ 3) % Row 2 \SetRowColor{LightBackground} \textless{}embed\textgreater{} & Container voor buitenstaande applicaties \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \textless{}object\textgreater{} & Embedded object \tn % Row Count 7 (+ 1) % Row 4 \SetRowColor{LightBackground} \textless{}param\textgreater{} & De parameters voor een object \tn % Row Count 8 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}