Home / Learn HTML / HTML Cheat Sheet: Printable PDF
HTML Cheat Sheet: Printable PDF
One A4 page of the tags and attributes you use most. Press the button and save it as a PDF.
In shortPress Print, choose Save as PDF.
This is one page of what you use most. Press the button, then choose "Save as PDF" in the print window. It fits on A4.
HTML Cheat Sheetxtoolmint.com/learn-html-tutorial
Page skeleton
<!doctype html> | HTML5 mode |
<html lang="en"> | Root, set language |
<meta charset="utf-8"> | Text encoding |
<meta name="viewport" content="width=device-width, initial-scale=1"> | Mobile width |
<title> | Tab and search title |
<meta name="description" content=""> | Search snippet |
<link rel="stylesheet" href=""> | Load CSS |
<script src="" defer> | Load JavaScript |
Text
<h1>...<h6> | Headings |
<p> | Paragraph |
<br> <hr> | Line break, divider |
<strong> <em> | Important, stressed |
<b> <i> <u> | Bold, italic, underline |
<mark> <small> <sub> <sup> | Highlight, small, sub, super |
<blockquote> <q> <cite> | Quotes |
<pre> <code> | Preformatted, code |
Links and media
<a href="" target="_blank" rel="noopener"> | Link, new tab |
<a href="#id"> | Jump in page |
<a href="mailto:" / "tel:"> | Email, phone |
<img src="" alt="" width height loading="lazy"> | Image |
<picture><source srcset=""> | Responsive image |
<video controls poster> | Video |
<audio controls> | Audio |
<iframe src="" title=""> | Embed a page |
Lists and tables
<ul><li> | Bullet list |
<ol><li> | Numbered list |
<dl><dt><dd> | Term and meaning |
<table><tr> | Table and row |
<th> <td> | Header cell, data cell |
<thead> <tbody> <tfoot> | Table parts |
colspan="2" rowspan="2" | Merge cells |
<caption> | Table title |
Forms
<form action="" method="post"> | Form |
<label for="id"> | Label for an input |
<input type="text|email|password|number|date|file|checkbox|radio|submit"> | Input types |
<textarea> <select><option> | Big text, dropdown |
<button type="submit|button"> | Button |
required minlength pattern | Validation |
placeholder autocomplete name value | Common attributes |
<fieldset><legend> | Group fields |
Semantic layout
<header> <nav> | Top, menu |
<main> | Main content, once |
<section> <article> | Theme, standalone |
<aside> | Side content |
<footer> | Bottom |
<figure><figcaption> | Picture with caption |
<details><summary> | Open and close |
<div> <span> | Generic block, inline |
Global attributes
id="" class="" | Name and group |
style="" | Inline CSS |
title="" | Tooltip |
hidden | Hide element |
lang="" dir="" | Language, direction |
tabindex="0" | Keyboard focus |
data-*="" | Custom data |
contenteditable | Editable text |
Entities
< > | < > |
& | & |
" ' | " ' |
| Non-breaking space |
© ® ™ | © ® ™ |
€ £ ¥ | € £ ¥ |
♥ → ✓ | ♥ → ✓ |
₹ | ₹ |
My notes
Ask a question about this lesson