(New) The Complete HTML Cheat Sheet PDF
(New) The Complete HTML Cheat Sheet PDF
Document Summary
Document Information
<page> 2
Document Structure
Text Formatting
<page> 3
Links
Images
<page> 4
Lists
Forms
Input Type Attributes
<page> 5
Select Attributes
Option Attributes
<page> 6
Table Formatting
Objects and iFrames
iFrame Attributes
<page> 7
Embed Attributes
HTML5 New Tags
Collective Character Objects
www.hostinger.com
www.hostinger.com
<tt> … </tt>
Formatting for typewriter-like text. No longer
supported in HTML5.
<i> … </i>
Also used to display text in italics, but does not
emphasize it like the above tag.
www.hostinger.com www.hostinger.com
Example width=”” enctype=””
Specifies image width in pixels or percentages. Only for POST method, this dictates the data
<p><strong>Bold text</strong> Regular text encoding scheme to be used when form
<em>some words in italics</em> regular text align=”” is submitted.
The relative alignment of the image. Can change <ol> … </ol>
once again.</p>
with changes to other elements in the webpage. Tag for ordered or numbered list of items.
autocomplete
<blockquote> Determines if the form has auto-complete enabled.
border=”” <ul> … </ul>
Anyone who has never made a mistake has never
Specifies border thickness of the image. If not Contrary to the above tag, used for unordered
tried anything new.<cite>- Albert Einstein</cite> novalidate
mentioned, defaults to 0. list of items.
</blockquote> Determines whether the form should be validated
before submission.
<map> … </map> <li> … </li>
<pre>
Denotes an interactive (clickable) image. Individual item as part of a list.
Some pre-formatted text accept-charsets
</pre> Determines character encodings when form
<map name=””> … </map> <dl> … </dl>
<p>A code snippet: <code>some code</code></p> is submitted.
Name of the map associated between the image Tag for list of items with definitions.
and the map. target
<dt> … </dt>
After submission, the form response is displayed
<area /> The definition of a single term inline with
wherever this refers to, usually has the following
Specifies image map area. body content.
values: _blank, _self, _parent, _top
name=””
Specifies the name of the input field.
<img />
A tag to display images in the webpage. value=””
<form> … </form> Specifies the value contained currently in
src=”url” The parent tag for an HTML form. the input field.
The URL or path where the image is located on
your drive or on the web. action=”url” size=””
The URL listed here is where the form data Determines the input element width
alt=”text” will be submitted once user fills it. (number of characters).
The text written here is displayed when user
hovers mouse over the image. Can be used to method=””
give additional details of the image. It specifies which HTTP method (POST or GET)
would be used to submit the form.
height=””
Specifies image height in pixels or percentages.
www.hostinger.com www.hostinger.com
maxlength=”” required
Specifies the most input field characters allowed. Specifies whether choosing an option/s is
necessary for form submission.
required
Makes an input field compulsory to be filled by autofocus <table> … </table> <object> … </object>
the user. The form cannot be submitted if a required Specifies that a drop-down list automatically Marks a table in a webpage. This tag is used to embed additional multimedia into
field is left empty. comes into focus after a page loads. a webpage. Can be audio, video, document (pdf) etc.
<caption> … </caption>
width=”” <option> … </option> Description of the table is placed inside this tag. height=””
Determines the width of the input element, Tag for listing individual items in the list Determines object height in pixel values.
in pixel values. <thead> … </thead>
of options.
Specifies information pertaining to specific width=””
height=”” columns of the table. Determines object width in pixel values.
Determines the height of the input element,
in pixel values. <tbody> … </tbody> type=””
The body of a table, where the data is held. The type/format of the object’s contents.
placeholder=””
Can be used to give hints to the user about the nature value=”” <iframe> … </iframe>
<tfoot> … </tfoot>
of the requested data. The text visible to the user for any given option. Determines the footer of the table. An inline block of content, this is used as a container
for multimedia in a flexible manner. It floats inside
pattern=”” selected <tr> … </tr> a webpage, meaning it is placed relative to other
Specifies a regular expression, which can be used to Determines which option is selected by default
look for patterns in the user’s text. Denotes a single row in a table. webpage items.
when the form loads.
min=”” <th> … </th>
<button> … </button> The value of a heading of a table’s column.
The minimum value allowed for an <input> element.
Tag for creating a button for form submission.
max=”” <td> … </td>
The maximum value allowed for an <input> element. Example A single cell of a table. Contains the actual
value/data. name=””
autofocus <form action="form_submit.php" method="post"> The name of the iFrame.
Forces focus on the input element when webpage <fieldset> <colgroup> … </colgroup>
loads completely. <legend>Bio:</legend> Used for grouping columns together. src=””
First name:<br> The source URL/path of the multimedia object
disabled <input type="text" name="first-name" <col> to be held inside the iFrame.
Disables the input element. User can no longer value="John" placeholder="Please Denotes a column inside a table.
enter data. enter your first name here"><br> srcdoc=””
Any HTML content to be displayed inside
<textarea> … </textarea>
Last name:<br> Example the iFrame.
<input type="text" name="last-name"
For longer strings of input. Can be used to get value="Doe" placeholder="Please
multi-sentence text from the user. <table>
enter your last name here"><br><br> height=””
<colgroup>
Favorite sport:<br> Determines the height of the iFrame.
<select> … </select> <col span="2">
<select> <col>
This tag specifies a list of options which the user width=” ”
can choose from. <option value="soccer">Soccer </colgroup>
</option> Determines the width of the iFrame.
<tr>
<option value="tennis">Tennis <th>Name</th>
</option> <param />
<th>Major</th>
<option value="golf">Golf For iFrame customization. This includes
<th>GPA</th>
</option> additional parameters to go along with
</tr>
</select> the content.
<tr>
<textarea name="description"> <td>Bob</td>
</textarea> <embed> … </embed>
name=”” <td>Law</td>
<input type="submit" value="Submit"> This is used to embed external objects, like
The name of a particular list of options. <td>3.55</td>
</fieldset> plugins (e.g. a flash video).
</tr>
size=”” </form> <tr>
Total number of options given to the user. <td>Alice</td>
<td>Medicine</td>
multiple <td>3.61</td>
States whether the user can choose multiple </tr>
options from the list. </table>
www.hostinger.com www.hostinger.com
<figure>…</figure>
A tag reserved for figures (diagrams, charts) in HTML5.
<figcaption> … </figcaption>
height=”“ A description of the figure is placed inside these.
Determines the height of the embedded item.
<mark>…</mark>
width=”“ Used to highlight a particular portion of the text.
Determines the width of the embedded item.
<nav>…</nav>
type=”” Navigation links for the user in a webpage.
The type or format of the embedded content.
<menuitem>…</menuitem>
src=”” A particular item from a list or a menu.
The URL/path of the embedded item.
<meter>…</meter>
Example Measures data within a given range.
<rt>…</rt>
Displays East Asian typography character details.
<header> … </header>
Specifies the webpage header. Could also be used <ruby>…</ruby>
for objects inside the webpage. Describes a Ruby annotation for East Asian
typography
<footer> … </footer>
Specifies the webpage footer. Could also be used <time>…</time>
for objects inside the webpage. Tag for formatting date and time.
<main>…</main> <wbr>
Marks the main content of the webpage. A line-break within the content.
<article>…</article>
Denotes an article.
<aside> … </aside>
Denotes content displayed in a sidebar of
" " & &
the webpage.
Quotation Marks - “ Ampersand - &
<section>…</section>
Specifies a particular section in the webpage. < < @ Ü
Less than sign - < @ Symbol - @
<details> … </details>
Used for additional information. User has > > • ö
the option to view or hide this. Greater than sign - > Small bullet - •
www.hostinger.com