Sei sulla pagina 1di 2

T

E

E

H

S

T

A

E

H

C

L

M

T

H

Page 1 of 2

Cheat Sheet
Cheat Sheet

Basic HTML Document Outline:

<html>

<head>

<title>HTML Doc</title> </head> <body> <div>

<h1>HTML Document</h1> <p>This is an HTML document!</p>

</div>

</body>

</html>

HTML Document Outline <html> HTML document. <head> Document header information. <body>
HTML Document Outline
<html>
HTML document.
<head>
Document header information.
<body>
Document body.
Page Information <meta> Metadata about the document. Will not be visible, but is machine parsable.
Page Information
<meta>
Metadata about the document. Will not be
visible, but is machine parsable.
<title>
Define the title of the document, and is
required.
<link>
Define a link between the HTML and an
external resource, usually a stylesheet.
<style>
Define style information.
<script>
Define a client-side script.
information. <script> Define a client-side script. learnto program . t v Document Structure <a

learnto program .tv

Document Structure <a href="url"> Hyperlink to another location.
Document Structure
<a href="url">
Hyperlink to another location.
<h1>,<h2>,<h3>,
Set text as heading, determine size.
<h4>,<h5>,<h6>
<div>
Define a division or section of an HTML
document, used to group block-elements for
formatting with CSS.
<span>
Group inline elements, used to add a hook to
text. No formatting by itself.
<p>
Define a paragraph.
<br>
Define a line break.
<hr>
Define a horizontal rule or thematic break.
Lists <ol> Define an ordered list, or a list that is ordered numerically or alphabetically.
Lists
<ol>
Define an ordered list, or a list that is ordered
numerically or alphabetically.
<ul>
Define an unordered list.
<li>
Define an item on an ordered or unordered
list.
<dl>
Define a description list, used with <dt> and
<dd>
<dt>
Define a description term, or the name of an
item in a description list.
<dd>
Define a description of an item in a
description list.

T

E

E

H

S

T

A

E

H

C

L

M

T

H

Page 2 of 2

Forms <form> Create a form that receives user input. <fieldset> Group related form elements together.
Forms
<form>
Create a form that receives user input.
<fieldset>
Group related form elements together.
<label>
Define the label for an <input> form element.
<input>
Define a field where a user can enter data.
<select>
Create a drop-down list in a form.
<optgroup>
Group related options in a drop-down list.
<option>
Define an option in a drop-down list.
<textarea>
Create a text input field within a form.
<button>
Create a clickable button.
Tables <table> Define an HTML table consisting of one or more <tr>, <th>, and <td>
Tables
<table>
Define an HTML table consisting of one or
more <tr>, <th>, and <td> elements.
<caption>
A table caption.
<thead>
Define table header content. Must be used
after <table>, <caption>, and <colgroup> but
before <tbody>, <tfoot>, and <tr>.
<tbody>
Define the body of a table. Must be used after
<table>, <caption>, <colgroup>, or <thead>
elements.
<colgroup>
Group columns together for formatting.
<col>
Specify properties for individual columns
within a <colgroup>
for individual columns within a <colgroup> learnto program . t v <tr> Define a row in

learnto program .tv

<tr> Define a row in an HTML table. <th> Define a cell in a table
<tr>
Define a row in an HTML table.
<th>
Define a cell in a table row as a header
element.
<td>
Define a cell in a table row as a data element.
Text Formatting
<strong>
Define important text.
<em>
Define emphasized text.
<blockquote>
Define text quoted from another source.
<q>
Define a short quotation.
<abbr>
Define an abbreviation.
<address>
Define the contact information for the author
of a document or article.
<pre>
Define pre-formatted, text that preserves
spaces and line-breaks.
<dfn>
Set the defining instance of a term.
<code>
Define a piece of computer code.
<cite>
Define a citation of the title of a work.
<sub>
Define subscript text.
<sup>
Define superscript text.
<bdo>
Set bi-directional override, making text
direction reverse.