The HyperText Markup Language (HTML) is composed of a set of elements that define a document and guide its display. This document presents a concise reference guide to HTML, listing the most commonly used elements from Versions 1 and 2 of HTML, and giving a brief description of those elements.
Users should be aware that HTML is an evolving language, and different World-Wide Web browsers may recognize slightly different sets of HTML elements. For general information about HTML including plans for new versions, see http://www.w3.org/html/.
UPDATE: the latest version of HTML as on Dec 2015 is HTML5, which is more than just a Markup Language -- it is touted as a platform for building websites, taking over functions like video and sound so that HTML5 pages will (ideally) produce the same results on all browsers. Many of the old HTML tags have been "deprecated" in favor of the more powerful ones in HTML5; but so far most browsers still render the deprecated tags as well.
An HTML element may include a name, some attributes and some text or hypertext, and will appear in an HTML document as
<tag_name> text </tag_name>
<tag_name attribute_name=argument> text </tag_name>
,
or just
<tag_name>
<center> text </center>
<a href="argument"> text </a>
<p align="center"> text </p>
<p>
. . . </p>
align="center"
attribute, if included as in the example above, will center-justify
the text until </p>
ends the paragraph.
The text is left-justified by default.
<pre>
. . . </pre>
<pre>
tag can be used to include tables
in documents, but <table>
. . .
</table>
and associated tags are better.)
<listing>
. . . </listing>
<xmp>
. . . </xmp>
<pre>
except no embedded tags will be
recognized.
<plaintext>
<pre>
except no embedded tags will be
recognized, and since there is no end tag, the remainder of the document
will be rendered as plain text. This is an archaic tag. Note that some
browsers actually recognize a </plaintext>
tag, even
though it is not defined by the standard.
<blockquote>
. . . </blockquote>
<em>
. . . </em>
<strong>
. . . </strong>
<code>
. . . </code>
<samp>
. . . </samp>
<kbd>
. . . </kbd>
<var>
. . . </var>
<dfn>
. . . </dfn>
<cite>
. . . </cite>
<b>
. . . </b>
<i>
. . . </i>
<u>
. . . </u>
<tt>
. . . </tt>
<a name="anchor_name">
. . . </a>
<a href="#anchor_name">
. . . </a>
<a href="URL">
. . . </a>
<a href="URL#anchor_name">
. . . </a>
<a href="URL?search_word+search_word">
. . . </a>
name
or href
attribute,
and may include both. There are several optional attributes, but they are
rarely encountered.
The structure of a Uniform Resource Locator (URL) may be expressed as:
file
, http
,
news
, gopher
, telnet
, ftp
,
and wais
, among others, and each resource type relates to a
specific server type. Since each server performs a unique function, each
resource type requires different additional_information
. For
example http
and gopher
URLs will have a structure
like:
Strictly speaking, the anchor_name
and search_word
information included in the name
and href
attributes
in the examples above are part of the URL. They are presented as separate
entities for simplicity. A more complete description of URLs is presented
in http://www.w3.org/Addressing/.
<dl>
<dt>
First term to be defined
<dd>
Definition of first term
<dt>
Next term to be defined
<dd>
Next definition
</dl>
<dl>
attribute compact
can be used to
generate a definition list requiring less space.
<ul>
<li>
First item in the list
<li>
Next item in the list
</ul>
<ol>
<li>
First item in the list
<li>
Next item in the list
</ol>
&
keyword;
µ
specifies the Greek letter "mu" ( µ ),
the entity &
specifies the ampersand ( & )
and the entities <
and >
specify the less than ( < ) and greater than ( > ) characters,
respectively. Note that the semicolon following the keyword is
required, and the keyword must be one from the lists presented in
&#
ascii_equivalent;
ascii_equivalent
is required.
<!--
text -->
<address>
. . . </address>
<img src="URL" alt="Alternate Text">
src
alt
align
align
can be one of top
,
middle
, or bottom
.
ismap
ismap
is present and the image tag is within an
anchor, the image will become a "clickable image". The pixel coordinates
of the cursor will be appended to the URL specified in the anchor
if the user clicks within the ismap image. The resulting URL will
take the form "URL?m,n" where m and n are integer coordinates, and
the URL will specify the location of a program that will examine
the pixel coordinates, and return an appropriate document.
<br>
<hr>
Again, for general information about HTML, see http://www.w3.org/html/.