Home /Modules/html-spec/intro.html

intro.html

html-spec/specifications/prose/html-4.01/intro/intro.html · 535 line(s) · html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Introduction to HTML 4</title>
<link rel="previous" href="../about.html">
<link rel="next" href="sgmltut.html">
<link rel="contents" href="../cover.html#toc">
<link rel="stylesheet" type="text/css" href= 
"http://www.w3.org/StyleSheets/TR/W3C-REC">
<link rel="STYLESHEET" href="../style/default.css" type="text/css">
</head>
<body>
<div class="navbar" align="center">&nbsp;<a href="../about.html">previous</a>
&nbsp; <a href="sgmltut.html">next</a> &nbsp; <a href="../cover.html#minitoc">
contents</a> &nbsp; <a href="../index/elements.html">elements</a> &nbsp; <a
href="../index/attributes.html">attributes</a> &nbsp; <a href= 
"../index/list.html">index</a> 

<hr></div>

<h1 align="center"><a name="h-2">2</a> Introduction to HTML 4</h1>

<div class="subtoc">
<p><strong>Contents</strong></p>

<ol>
<li><a class="tocxref" href="#h-2.1">What is the World Wide Web?</a> 

<ol>
<li><a class="tocxref" href="#h-2.1.1">Introduction to URIs</a></li>

<li><a class="tocxref" href="#h-2.1.2">Fragment identifiers</a></li>

<li><a class="tocxref" href="#h-2.1.3">Relative URIs</a></li>
</ol>
</li>

<li><a class="tocxref" href="#h-2.2">What is HTML?</a> 

<ol>
<li><a class="tocxref" href="#h-2.2.1">A brief history of HTML</a></li>
</ol>
</li>

<li><a class="tocxref" href="#h-2.3">HTML 4</a> 

<ol>
<li><a class="tocxref" href="#h-2.3.1">Internationalization</a></li>

<li><a class="tocxref" href="#h-2.3.2">Accessibility</a></li>

<li><a class="tocxref" href="#h-2.3.3">Tables</a></li>

<li><a class="tocxref" href="#h-2.3.4">Compound documents</a></li>

<li><a class="tocxref" href="#h-2.3.5">Style sheets</a></li>

<li><a class="tocxref" href="#h-2.3.6">Scripting</a></li>

<li><a class="tocxref" href="#h-2.3.7">Printing</a></li>
</ol>
</li>

<li><a class="tocxref" href="#h-2.4">Authoring documents with HTML 4</a> 

<ol>
<li><a class="tocxref" href="#h-2.4.1">Separate structure and
presentation</a></li>

<li><a class="tocxref" href="#h-2.4.2">Consider universal accessibility to the
Web</a></li>

<li><a class="tocxref" href="#h-2.4.3">Help user agents with incremental
rendering</a></li>
</ol>
</li>
</ol>
</div>

<h2><a name="h-2.1">2.1</a> What is the World Wide Web?</h2>

<p>The <span class="index-def" title="World Wide Web (Web)"><a name= 
"didx-World_Wide_Web_Web"><dfn>World Wide Web (Web)</dfn></a></span> is a
network of information resources. The Web relies on three mechanisms to make
these resources readily available to the widest possible audience:</p>

<ol>
<li>A uniform naming scheme for locating resources on the Web (e.g.,
URIs).</li>

<li>Protocols, for access to named resources over the Web (e.g., HTTP).</li>

<li>Hypertext, for easy navigation among resources (e.g., HTML).</li>
</ol>

<p>The ties between the three mechanisms are apparent throughout this
specification.</p>

<h3><a name="h-2.1.1">2.1.1</a> <a name="intro-uris">Introduction to
URIs</a></h3>

<p>Every resource available on the Web -- HTML document, image, video clip,
program, etc. -- has an address that may be encoded by a <span class=
"index-def" title="Universal Resource Identifier (see URI)"><a name= 
"didx-Universal_Resource_Identifier_see_URI"><dfn>Universal Resource
Identifier</dfn></a></span>, or "URI".</p>

<p>URIs typically consist of three pieces:</p>

<ol>
<li>The naming scheme of the mechanism used to access the resource.</li>

<li>The name of the machine hosting the resource.</li>

<li>The name of the resource itself, given as a path.</li>
</ol>

<p>Consider the URI that designates the W3C Technical Reports page:</p>

<pre>
   http://www.w3.org/TR
</pre>

<p>This URI may be read as follows: There is a document available via the HTTP
protocol (see <a rel="biblioentry" href="../references.html#ref-RFC2616" class= 
"informref">[RFC2616]</a>), residing on the machine www.w3.org, accessible via
the path "/TR". Other schemes you may see in HTML documents include "mailto"
for email and "ftp" for FTP.</p>

<div class="example">
<p>Here is another example of a URI. This one refers to a user's mailbox:</p>

<pre>
   <em>...this is text...</em>
   For all comments, please send email to 
   &lt;A href="mailto:joe@someplace.com"&gt;Joe Cool&lt;/A&gt;.
</pre>
</div>

<div class="note">
<p><em><strong>Note.</strong> Most readers may be familiar with the term <span
class="index-inst" title="URL::relationship to URI"><a name="idx-URL">
"URL"</a></span> and not the term "URI". URLs form a subset of the more general
URI naming scheme.</em></p>
</div>

<h3><a name="h-2.1.2">2.1.2</a> <a name="fragment-uri">Fragment
identifiers</a></h3>

<p>Some URIs refer to a location within a resource. This kind of URI ends with
"#" followed by an anchor identifier (called the <span class="index-def" title= 
"fragment identifier"><a name="didx-fragment_identifier"><dfn>fragment
identifier</dfn></a></span>). For instance, here is a URI pointing to an anchor
named <samp>section_2</samp>:</p>

<pre class="example">
http://somesite.com/html/top.html#section_2
</pre>

<h3><a name="h-2.1.3">2.1.3</a> <a name="relative-uris">Relative URIs</a></h3>

<p>A <span class="index-def" title="relative URI|URI::relative"><a name= 
"didx-relative_URI"><dfn>relative URI</dfn></a></span> doesn't contain any
naming scheme information. Its path generally refers to a resource on the same
machine as the current document. Relative URIs may contain relative path
components (e.g., ".." means one level up in the hierarchy defined by the
path), and may contain <a href="#fragment-uri">fragment identifiers</a>.</p>

<p><span class="index-inst" title="relative URI::resolution of|URI::resolution 
of relative"><a name="idx-relative_URI-1">Relative URIs</a></span> are <a href= 
"../struct/links.html#resolving-relative-uris">resolved to full URIs</a> using
a base URI. As an example of relative URI resolution, assume we have the base
URI "http://www.acme.com/support/intro.html". The relative URI in the following
markup for a hypertext link:</p>

<pre>
   &lt;A href="suppliers.html"&gt;Suppliers&lt;/A&gt;
</pre>

<p>would expand to the full URI "http://www.acme.com/support/suppliers.html",
while the relative URI in the following markup for an image</p>

<pre>
   &lt;IMG src="../icons/logo.gif" alt="logo"&gt;
</pre>

<p>would expand to the full URI "http://www.acme.com/icons/logo.gif".</p>

<p>In HTML, <span class="index-inst" title="URI::uses of in HTML"><a name= 
"idx-URI-2">URIs</a></span> are used to:</p>

<ul>
<li>Link to another document or resource, (see the <a href= 
"../struct/links.html#edef-A" class="noxref"><samp class="einst">A</samp></a>
and <a href="../struct/links.html#edef-LINK" class="noxref"><samp class=
"einst">LINK</samp></a> elements).</li>

<li>Link to an external style sheet or script (see the <a href= 
"../struct/links.html#edef-LINK" class="noxref"><samp class="einst">
LINK</samp></a> and <a href="../interact/scripts.html#edef-SCRIPT" class=
"noxref"><samp class="einst">SCRIPT</samp></a> elements).</li>

<li>Include an image, object, or applet in a page, (see the <a href= 
"../struct/objects.html#edef-IMG" class="noxref"><samp class="einst">
IMG</samp></a>, <a href="../struct/objects.html#edef-OBJECT" class="noxref">
<samp class="einst">OBJECT</samp></a>, <a href= 
"../struct/objects.html#edef-APPLET" class="noxref"><samp class="einst">
APPLET</samp></a> and <a href="../interact/forms.html#edef-INPUT" class=
"noxref"><samp class="einst">INPUT</samp></a> elements).</li>

<li>Create an image map (see the <a href="../struct/objects.html#edef-MAP"
class="noxref"><samp class="einst">MAP</samp></a> and <a href= 
"../struct/objects.html#edef-AREA" class="noxref"><samp class="einst">
AREA</samp></a> elements).</li>

<li>Submit a form (see <a href="../interact/forms.html#edef-FORM" class=
"noxref"><samp class="einst">FORM</samp></a>).</li>

<li>Create a frame document (see the <a href=
"../present/frames.html#edef-FRAME" class="noxref"><samp class="einst">
FRAME</samp></a> and <a href="../present/frames.html#edef-IFRAME" class=
"noxref"><samp class="einst">IFRAME</samp></a> elements).</li>

<li>Cite an external reference (see the <a href="../struct/text.html#edef-Q"
class="noxref"><samp class="einst">Q</samp></a>, <a href= 
"../struct/text.html#edef-BLOCKQUOTE" class="noxref"><samp class="einst">
BLOCKQUOTE</samp></a>, <a href="../struct/text.html#edef-ins" class="noxref">
<samp class="einst">INS</samp></a> and <a href="../struct/text.html#edef-del"
class="noxref"><samp class="einst">DEL</samp></a> elements).</li>

<li>Refer to metadata conventions describing a document (see the <a href= 
"../struct/global.html#edef-HEAD" class="noxref"><samp class="einst">
HEAD</samp></a> element).</li>
</ul>

<p>Please consult the section on the <a href="../types.html#type-uri">URI</a>
type for more information about URIs.</p>

<h2><a name="h-2.2">2.2</a> What is HTML?</h2>

<p>To publish information for global distribution, one needs a universally
understood language, a kind of publishing mother tongue that all computers may
potentially understand. The publishing language used by the World Wide Web is
HTML (from HyperText Markup Language).</p>

<p>HTML gives authors the means to:</p>

<ul>
<li>Publish online documents with headings, text, tables, lists, photos,
etc.</li>

<li>Retrieve online information via hypertext links, at the click of a
button.</li>

<li>Design forms for conducting transactions with remote services, for use in
searching for information, making reservations, ordering products, etc.</li>

<li>Include spread-sheets, video clips, sound clips, and other applications
directly in their documents.</li>
</ul>

<h3><a name="h-2.2.1">2.2.1</a> A brief history of HTML</h3>

<p><span class="index-inst" title="HTML::development of"><a name="idx-HTML">
HTML</a></span> was originally developed by Tim Berners-Lee while at <span
class="index-inst" title="CERN"><a name="idx-CERN">CERN,</a></span> and
popularized by the Mosaic browser developed at NCSA. During the course of the
1990s it has blossomed with the explosive growth of the Web. During this time,
HTML has been extended in a number of ways. The Web depends on Web page authors
and vendors sharing the same conventions for HTML. This has motivated joint
work on specifications for HTML.</p>

<p><span class="index-inst" title="HTML::version 2.0"><a name="idx-HTML-1">HTML
2.0</a></span> (November 1995, see <a rel="biblioentry" href= 
"../references.html#ref-RFC1866" class="informref">[RFC1866]</a>) was developed
under the aegis of the <span class="index-inst" title="Internet Engineering 
Task Force (IETF)"><a name="idx-Internet_Engineering_Task_Force_IETF">Internet
Engineering Task Force (IETF)</a></span> to codify common practice in late
1994. <span class="index-inst" title="HTML::version HTML+"><a name=
"idx-HTML-2">HTML+</a></span> (1993) and <span class="index-inst" title= 
"HTML::version 3.0"><a name="idx-HTML-3">HTML 3.0</a></span> (1995, see <a rel= 
"biblioentry" href="../references.html#ref-HTML30" class="informref">
[HTML30]</a>) proposed much richer versions of HTML. Despite never receiving
consensus in standards discussions, these drafts led to the adoption of a range
of new features. The efforts of the World Wide Web Consortium's HTML Working
Group to codify common practice in 1996 resulted in <span class="index-inst"
title="HTML::version 3.2"><a name="idx-HTML-4">HTML 3.2</a></span> (January
1997, see <a rel="biblioentry" href="../references.html#ref-HTML32" class= 
"informref">[HTML32]</a>). Changes from HTML 3.2 are summarized in <a href= 
"../appendix/changes.html">Appendix A</a></p>

<p>Most people agree that HTML documents should work well across different
browsers and platforms. Achieving interoperability lowers costs to content
providers since they must develop only one version of a document. If the effort
is not made, there is much greater risk that the Web will devolve into a
proprietary world of incompatible formats, ultimately reducing the Web's
commercial potential for all participants.</p>

<p>Each version of HTML has attempted to reflect greater consensus among
industry players so that the investment made by content providers will not be
wasted and that their documents will not become unreadable in a short period of
time.</p>

<p>HTML has been developed with the vision that all manner of devices should be
able to use information on the Web: PCs with graphics displays of varying
resolution and color depths, cellular telephones, hand held devices, devices
for speech for output and input, computers with high or low bandwidth, and so
on.</p>

<h2><a name="h-2.3">2.3</a> HTML 4</h2>

<p>HTML 4 extends HTML with mechanisms for style sheets, scripting, frames,
embedding objects, improved support for right to left and mixed direction text,
richer tables, and enhancements to forms, offering improved accessibility for
people with disabilities.</p>

<p>HTML 4.01 is a revision of HTML 4.0 that corrects errors and makes some <a
href="../appendix/changes.html">changes since the previous revision.</a></p>

<h3><a name="h-2.3.1">2.3.1</a> Internationalization</h3>

<p>This version of HTML has been designed with the help of experts in the field
of internationalization, so that documents may be written in every language and
be transported easily around the world. This has been accomplished by
incorporating <a rel="biblioentry" href="../references.html#ref-RFC2070" class= 
"informref">[RFC2070]</a>, which deals with the internationalization of
HTML.</p>

<p>One important step has been the adoption of the ISO/IEC:10646 standard (see
<a rel="biblioentry" href="../references.html#ref-ISO10646" class="normref">
[ISO10646]</a>) as the document character set for HTML. This is the world's
most inclusive standard dealing with issues of the representation of
international characters, text direction, punctuation, and other world language
issues.</p>

<p>HTML now offers greater support for diverse human languages within a
document. This allows for more effective indexing of documents for search
engines, higher-quality typography, better text-to-speech conversion, better
hyphenation, etc.</p>

<h3><a name="h-2.3.2">2.3.2</a> <span class="index-inst" title= 
"accessibility::features in HTML 4"><a name="accessibility">
Accessibility</a></span></h3>

<p>As the Web community grows and its members diversify in their abilities and
skills, it is crucial that the underlying technologies be appropriate to their
specific needs. HTML has been designed to make Web pages more accessible to
those with physical limitations. HTML 4 developments inspired by concerns for
accessibility include:</p>

<ul>
<li>Better distinction between document structure and presentation, thus
encouraging the use of style sheets instead of HTML presentation elements and
attributes.</li>

<li>Better forms, including the addition of access keys, the ability to group
form controls semantically, the ability to group <a href= 
"../interact/forms.html#edef-SELECT" class="noxref"><samp class="einst">
SELECT</samp></a> options semantically, and active labels.</li>

<li>The ability to markup a text description of an included object (with the <a
href="../struct/objects.html#edef-OBJECT" class="noxref"><samp class="einst">
OBJECT</samp></a> element).</li>

<li>A new client-side image map mechanism (the <a href= 
"../struct/objects.html#edef-MAP" class="noxref"><samp class="einst">
MAP</samp></a> element) that allows authors to integrate image and text
links.</li>

<li>The requirement that alternate text accompany images included with the <a
href="../struct/objects.html#edef-IMG" class="noxref"><samp class="einst">
IMG</samp></a> element and image maps included with the <a href= 
"../struct/objects.html#edef-AREA" class="noxref"><samp class="einst">
AREA</samp></a> element.</li>

<li>Support for the <a href="../struct/global.html#adef-title" class="noxref">
<samp class="ainst">title</samp></a> and <a href= 
"../struct/dirlang.html#adef-lang" class="noxref"><samp class="ainst">
lang</samp></a> attributes on all elements.</li>

<li>Support for the <a href="../struct/text.html#edef-ABBR" class="noxref">
<samp class="einst">ABBR</samp></a> and <a href= 
"../struct/text.html#edef-ACRONYM" class="noxref"><samp class="einst">
ACRONYM</samp></a> elements.</li>

<li>A wider range of target media (tty, braille, etc.) for use with style
sheets.</li>

<li>Better tables, including captions, column groups, and mechanisms to
facilitate non-visual rendering.</li>

<li>Long descriptions of tables, images, frames, etc.</li>
</ul>

<p>Authors who design pages with accessibility issues in mind will not only
receive the blessings of the accessibility community, but will benefit in other
ways as well: well-designed HTML documents that distinguish structure and
presentation will adapt more easily to new technologies.</p>

<div class="note">
<p><em><strong>Note.</strong> For more information about designing accessible
HTML documents, please consult <a rel="biblioentry" href= 
"../references.html#ref-WAI" class="informref">[WAI]</a>.</em></p>
</div>

<h3><a name="h-2.3.3">2.3.3</a> Tables</h3>

<p>The new table model in HTML is based on <a rel="biblioentry" href= 
"../references.html#ref-RFC1942" class="informref">[RFC1942]</a>. Authors now
have greater control over structure and layout (e.g., column groups). The
ability of designers to recommend column widths allows user agents to display
table data incrementally (as it arrives) rather than waiting for the entire
table before rendering.</p>

<div class="note">
<p><em><strong>Note.</strong> At the time of writing, some HTML authoring tools
rely extensively on <span class="index-inst" title="table::not for formatting 
pages"><a name="idx-table">tables</a></span> for formatting, which may easily
cause accessibility problems.</em></p>
</div>

<h3><a name="h-2.3.4">2.3.4</a> Compound documents</h3>

<p>HTML now offers a standard mechanism for embedding generic media objects and
applications in HTML documents. The <a href=
"../struct/objects.html#edef-OBJECT" class="noxref"><samp class="einst">
OBJECT</samp></a> element (together with its more specific ancestor elements <a
href="../struct/objects.html#edef-IMG" class="noxref"><samp class="einst">
IMG</samp></a> and <a href="../struct/objects.html#edef-APPLET" class="noxref">
<samp class="einst">APPLET</samp></a>) provides a mechanism for including
images, video, sound, mathematics, specialized applications, and other objects
in a document. It also allows authors to specify a hierarchy of alternate
renderings for user agents that don't support a specific rendering.</p>

<h3><a name="h-2.3.5">2.3.5</a> Style sheets</h3>

<p>Style sheets simplify HTML markup and largely relieve HTML of the
responsibilities of presentation. They give both authors and users control over
the presentation of documents -- font information, alignment, colors, etc.</p>

<p>Style information can be specified for individual elements or groups of
elements. Style information may be specified in an HTML document or in external
style sheets.</p>

<p>The mechanisms for associating a style sheet with a document is independent
of the style sheet language.</p>

<p>Before the advent of style sheets, authors had limited control over
rendering. HTML 3.2 included a number of attributes and elements offering
control over alignment, font size, and text color. Authors also exploited
tables and images as a means for laying out pages. The relatively long time it
takes for users to upgrade their browsers means that these features will
continue to be used for some time. However, since style sheets offer more
powerful presentation mechanisms, the World Wide Web Consortium will eventually
phase out many of HTML's presentation elements and attributes. Throughout the
specification elements and attributes at risk are marked as "<a href= 
"../conform.html#deprecated">deprecated</a>". They are accompanied by examples
of how to achieve the same effects with other elements or style sheets.</p>

<h3><a name="h-2.3.6">2.3.6</a> Scripting</h3>

<p>Through scripts, authors may create dynamic Web pages (e.g., "smart forms"
that react as users fill them out) and use HTML as a means to build networked
applications.</p>

<p>The mechanisms provided to include scripts in an HTML document are
independent of the scripting language.</p>

<h3><a name="h-2.3.7">2.3.7</a> Printing</h3>

<p>Sometimes, authors will want to make it easy for users to print more than
just the current document. When documents form part of a larger work, the
relationships between them can be described using the HTML <a href= 
"../struct/links.html#edef-LINK" class="noxref"><samp class="einst">
LINK</samp></a> element or using W3C's <span class="index-inst" title="Resource 
Description Framework (RDF)"><a name="idx-Resource_Description_Framework_RDF">
Resource Description Framework (RDF)</a></span> (see <a href= 
"../references.html#ref-RDF10" class="informref">[RDF10]</a>).</p>

<h2><a name="h-2.4">2.4</a> Authoring documents with HTML 4</h2>

<p>We recommend that authors and implementors observe the following <span
class="index-inst" title="HTML::authoring tips"><a name="idx-HTML-5">general
principles</a></span> when working with HTML 4.</p>

<h3><a name="h-2.4.1">2.4.1</a> Separate structure and presentation</h3>

<p>HTML has its roots in SGML which has always been a language for the
specification of structural markup. As HTML matures, more and more of its
presentational elements and attributes are being replaced by other mechanisms,
in particular style sheets. Experience has shown that separating the structure
of a document from its presentational aspects reduces the cost of serving a
wide range of platforms, media, etc., and facilitates document revisions.</p>

<h3><a name="h-2.4.2">2.4.2</a> Consider universal accessibility to the
Web</h3>

<p>To make the Web more accessible to everyone, notably those with
disabilities, authors should consider how their documents may be rendered on a
variety of platforms: speech-based browsers, braille-readers, etc. We do not
recommend that authors limit their creativity, only that they consider
alternate renderings in their design. HTML offers a number of mechanisms to
this end (e.g., the <a href="../struct/objects.html#adef-alt" class="noxref">
<samp class="ainst">alt</samp></a> attribute, the <a href= 
"../interact/forms.html#adef-accesskey" class="noxref"><samp class="ainst">
accesskey</samp></a> attribute, etc.)</p>

<p>Furthermore, authors should keep in mind that their documents may be
reaching a far-off audience with different computer configurations. In order
for documents to be interpreted correctly, authors should include in their
documents information about the natural language and direction of the text, how
the document is encoded, and other issues related to internationalization.</p>

<h3><a name="h-2.4.3">2.4.3</a> Help user agents with incremental
rendering</h3>

<p>By carefully designing their tables and making use of new table features in
HTML 4, authors can help user agents render documents more quickly. Authors can
learn how to design tables for incremental rendering (see the <a href= 
"../struct/tables.html#edef-TABLE" class="noxref"><samp class="einst">
TABLE</samp></a> element). Implementors should consult the <a href= 
"../appendix/notes.html#notes-tables">notes on tables</a> in the appendix for
information on incremental algorithms.</p>

<div class="navbar" align="center">
<hr><a href="../about.html">previous</a> &nbsp; <a href="sgmltut.html">next</a>
&nbsp; <a href="../cover.html#minitoc">contents</a> &nbsp; <a href= 
"../index/elements.html">elements</a> &nbsp; <a href=
"../index/attributes.html">attributes</a> &nbsp; <a href="../index/list.html">
index</a></div>
</body>
</html>