\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{sally sung} \pdfinfo{ /Title (web-development.pdf) /Creator (Cheatography) /Author (sally sung) /Subject (Web Development 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}{7284FC} \definecolor{LightBackground}{HTML}{EDEFFE} \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{Web Development Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{sally sung} via \textcolor{DarkBackground}{\uline{cheatography.com/216190/cs/47180/}}} \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}sally sung \\ \uline{cheatography.com/sally-sung} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 16th October, 2025.\\ Updated 16th October, 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*}{3} \begin{tabularx}{5.377cm}{x{1.59264 cm} x{3.38436 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{HTML (Chapter 01)}} \tn % Row 0 \SetRowColor{LightBackground} Sectioning Elements & \textless{}header\textgreater{}, \textless{}nav\textgreater{}, \textless{}article\textgreater{}, \textless{}aside\textgreater{}, \textless{}footer\textgreater{}, \textless{}section\textgreater{} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} Grouping Elements & \textless{}blockquote\textgreater{}, \textless{}figure\textgreater{}, \textless{}figcaption\textgreater{} \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} Text-Level Elements & \textless{}strong\textgreater{}, \textless{}em\textgreater{}, \textless{}cite\textgreater{}, \textless{}q\textgreater{}, \textless{}br /\textgreater{} \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} Images \& Links & \textless{}img src="file.png" alt="Description" /\textgreater{} \tn % Row Count 9 (+ 2) % Row 4 \SetRowColor{LightBackground} Internal Links & \textless{}a href="\#section\_id"\textgreater{}Jump\textless{}/a\textgreater{} \tn % Row Count 11 (+ 2) % Row 5 \SetRowColor{white} URL Schemes & \textless{}a href="mailto:a@b.com"\textgreater{}Email\textless{}/a\textgreater{}, \textless{}a href="tel:1234567890"\textgreater{}Call\textless{}/a\textgreater{} \tn % Row Count 14 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.59264 cm} x{3.38436 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Selectors (Chapter 02)}} \tn % Row 0 \SetRowColor{LightBackground} * & Matches any element \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} parent \textgreater{} child & Matches the child element that is a child of the parent element \tn % Row Count 4 (+ 3) % Row 2 \SetRowColor{LightBackground} elem1 + elem2 & Matches elem2 that is immediately preceded by the sibling element elem1 \tn % Row Count 7 (+ 3) % Row 3 \SetRowColor{white} elem1 \textasciitilde{} elem2 & Matches elem2 that follows the sibling element elem1 \tn % Row Count 9 (+ 2) % Row 4 \SetRowColor{LightBackground} Attribute Selectors & h1\#intro, .main, a{[}href\textasciicircum{}="http"{]} (http로 시작하는 href) \tn % Row Count 12 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.34379 cm} x{3.63321 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Text \& Box Model (Chapter 02)}} \tn % Row 0 \SetRowColor{LightBackground} Text \seqsplit{Decoration} & text-decoration: type (none, underline, overline, line-through) \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} Text Transform & text-transform: type (capitalize, uppercase, lowercase, none) \tn % Row Count 6 (+ 3) % Row 2 \SetRowColor{LightBackground} Font Variant & font-variant : type (normal, small-caps) \tn % Row Count 8 (+ 2) % Row 3 \SetRowColor{white} Text Align & text-align : left, right, center, or justify \tn % Row Count 10 (+ 2) % Row 4 \SetRowColor{LightBackground} Font & font : normal small-caps bold 0.9em/3em Quicksand, Verdana, Geneva, sans-serif; \tn % Row Count 13 (+ 3) % Row 5 \SetRowColor{white} \seqsplit{Pseudo-Classes} & a:hover \{text-decoration: underline;\} \tn % Row Count 15 (+ 2) % Row 6 \SetRowColor{LightBackground} \seqsplit{Pseudo-Elements} & h1::after \{content: " — NEW";\} \tn % Row Count 17 (+ 2) % Row 7 \SetRowColor{white} Box Model & padding: 10px 5px 0px 5px; \tn % Row Count 18 (+ 1) % Row 8 \SetRowColor{LightBackground} Box Sizing & box-sizing: border-box; \tn % Row Count 19 (+ 1) % Row 9 \SetRowColor{white} Font Sizing & font-size: 1.2em; \tn % Row Count 21 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.64241 cm} x{3.33459 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Layout \& Positioning (Chapter 03)}} \tn % Row 0 \SetRowColor{LightBackground} Display & display: inline-block;, display: inline;, display: block;, display: none; \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} Horizontal Centering & body \{margin-left: auto; margin-right: auto;\} \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} Floating & float: left; \tn % Row Count 6 (+ 1) % Row 3 \SetRowColor{white} Clear & clear: both; \tn % Row Count 7 (+ 1) % Row 4 \SetRowColor{LightBackground} Container Collapse & container::after \{clear: both; content: ""; display: table;\} \tn % Row Count 10 (+ 3) % Row 5 \SetRowColor{white} CSS Grid & grid-template-columns: 1fr 2fr; (1:2 비율의 열 생성) \tn % Row Count 13 (+ 3) % Row 6 \SetRowColor{LightBackground} Grid Areas & grid-template-areas: "head head" "side main"; \tn % Row Count 15 (+ 2) % Row 7 \SetRowColor{white} Positioning & position: absolute; (좌표 기반 배치) \tn % Row Count 17 (+ 2) % Row 8 \SetRowColor{LightBackground} Stacking & z-index: 10; \tn % Row Count 18 (+ 1) % Row 9 \SetRowColor{white} Overflow & overflow: auto;, overflow: scroll;, overflow: hidden; \tn % Row Count 21 (+ 3) % Row 10 \SetRowColor{LightBackground} Clipping & clip: rect(10px, 200px, 150px, 0px); \tn % Row Count 23 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.64241 cm} x{3.33459 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Graphics \& Transforms (Chapter 04 - 01)}} \tn % Row 0 \SetRowColor{LightBackground} Figure Box & \textless{}figure\textgreater{}\textless{}img ... /\textgreater{}\textless{}figcaption\textgreater{}Caption\textless{}/figcaption\textgreater{}\textless{}/figure\textgreater{} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} Background Images & background-size: cover; 또는 contain; \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} Multiple Backgrounds & background: bg1, bg2, color; \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} Borders & border: 2px solid black; \tn % Row Count 8 (+ 1) % Row 4 \SetRowColor{LightBackground} Rounded Corners & border-radius: 15px 50px; \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} Border Image & border-image: url(file.png) 50 repeat; \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} Text Shadow & text-shadow: color offsetX offsetY blur; \tn % Row Count 14 (+ 2) % Row 7 \SetRowColor{white} Box Shadow & box-shadow: 5px 5px 10px gray; \tn % Row Count 16 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.9154 cm} x{1.8308 cm} x{1.8308 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{Graphics \& Transforms (Chapter 04)}} \tn % Row 0 \SetRowColor{LightBackground} Figure Box & \seqsplit{캡션(figcaption)을} 포함하는 독립적인 \seqsplit{콘텐츠(figure)} \seqsplit{그룹입니다.} & \textless{}figure\textgreater{}\textless{}img ... /\textgreater{}\textless{}figcaption\textgreater{}Caption\textless{}/figcaption\textgreater{}\textless{}/figure\textgreater{} \tn % Row Count 6 (+ 6) % Row 1 \SetRowColor{white} \seqsplit{Background} Images & \seqsplit{background-image:} url()로 이미지를 추가하고, \seqsplit{background-repeat:} no-repeat로 반복을 \seqsplit{제어합니다.} & \seqsplit{background-size:} cover; 또는 contain; \tn % Row Count 13 (+ 7) % Row 2 \SetRowColor{LightBackground} \seqsplit{Multiple} \seqsplit{Backgrounds} & 쉼표로 구분하여 여러 배경을 한 요소에 적용합니다 (순서가 중요함). & background: bg1, bg2, color; \tn % Row Count 19 (+ 6) % Row 3 \SetRowColor{white} Borders & border: width style color로 두께, 스타일, 색상을 \seqsplit{정의합니다.} & border: 2px solid black; \tn % Row Count 24 (+ 5) % Row 4 \SetRowColor{LightBackground} Rounded Corners & 모서리를 둥글게 \seqsplit{처리합니다.} & border-radius: 15px 50px; \tn % Row Count 27 (+ 3) % Row 5 \SetRowColor{white} Border Image & 그래픽 이미지 파일을 사용하여 보더를 만듭니다. & border-image: url(file.png) 50 repeat; \tn % Row Count 32 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{0.9154 cm} x{1.8308 cm} x{1.8308 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{Graphics \& Transforms (Chapter 04) (cont)}} \tn % Row 6 \SetRowColor{LightBackground} Text Shadow & 텍스트에 그림자를 \seqsplit{추가합니다.} & text-shadow: color offsetX offsetY blur; \tn % Row Count 3 (+ 3) % Row 7 \SetRowColor{white} Box Shadow & 블록 요소에 그림자를 \seqsplit{추가합니다.} inset 키워드로 내부 그림자 가능. & box-shadow: 5px 5px 10px gray; \tn % Row Count 9 (+ 6) % Row 8 \SetRowColor{LightBackground} \seqsplit{Gradients} & linear-gradient (직선), radial-gradient \seqsplit{(방사형)으로} 색상을 \seqsplit{혼합합니다.} & background: \seqsplit{linear-gradient(red}, blue); \tn % Row Count 15 (+ 6) % Row 9 \SetRowColor{white} Opacity & 요소 전체의 불투명도를 설정합니다 (0.0\textasciitilde{}1.0). & opacity: 0.7; \tn % Row Count 19 (+ 4) % Row 10 \SetRowColor{LightBackground} 2D/3D \seqsplit{Transforms} & transform 속성을 사용하여 회전(rotate), 크기 조정(scale), \seqsplit{이동(translate)}, \seqsplit{기울이기(skew)를} \seqsplit{적용합니다.} perspective는 3D 원근감을 \seqsplit{정의합니다.} & transform: rotate(30deg) scale(1.2); \tn % Row Count 30 (+ 11) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{0.9154 cm} x{1.8308 cm} x{1.8308 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{Graphics \& Transforms (Chapter 04) (cont)}} \tn % Row 11 \SetRowColor{LightBackground} Filters & 이미지의 색상, 밝기, 대비 등을 \seqsplit{조정합니다.} & filter: grayscale(1.0);, filter: sepia(0.8); \tn % Row Count 4 (+ 4) % Row 12 \SetRowColor{white} Image Maps & 이미지의 특정 \seqsplit{영역(hotspot)에} 링크를 만듭니다. \textless{}map\textgreater{}, \textless{}area\textgreater{}를 사용하며, \textless{}img usemap="\#name"\textgreater{}으로 \seqsplit{연결합니다.} & \textless{}area shape="rect" coords="x1,y1,x2,y2" href="url" /\textgreater{} \tn % Row Count 13 (+ 9) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}