What
is HTML?
Short for HyperText Markup
Language, the authoring language used to create documents on the World Wide
Web. HTML is similar to SGML, although it is not a strict subset.
HTML defines the structure
and layout of a Web document by using a variety of tags and attributes. The
correct structure for an HTML document starts with
<HTML><HEAD>(enter here what document is about)<BODY> and
ends with </BODY></HTML>. All the information you'd like to include
in your Web page fits in between the <BODY> and </BODY> tags.
There are hundreds of
other tags used to format and layout the information in a Web page. Tags are
also used to specify hypertext links. These allow Web developers to direct
users to other Web pages with only a click of the mouse on either an image or
word(s). For a more complete list of tags, check out some of the URLs below.
Development:
In 1980, physicist Tim
Berners-Lee, who was a contractor at CERN, proposed and prototyped ENQUIRE, a
system for CERN researchers to use and share documents. In 1989, Berners-Lee
wrote a memo proposing an Internet-based hypertext system.[2] Berners-Lee
specified HTML and wrote the browser and server software in the last part of
1990. In that year, Berners-Lee and CERN data systems engineer Robert Cailliau
collaborated on a joint request for funding, but the project was not formally
adopted by CERN. In his personal notes[3] from 1990 he listed[4] "some of
the many areas in which hypertext is used" and put an encyclopedia first.
The first publicly
available description of HTML was a document called "HTML Tags",
first mentioned on the Internet by Berners-Lee in late 1991.[5][6] It describes
18 elements comprising the initial, relatively simple design of HTML. Except
for the hyperlink tag, these were strongly influenced by SGMLguid, an in-house
SGML-based documentation format at CERN. Eleven of these elements still exist
in HTML 4
HyperText Markup Language
is a markup language that web browsers use to interpret and compose text,
images and other material into visual or audible web pages. Default
characteristics for every item of HTML markup are defined in the browser, and
these characteristics can be altered or enhanced by the web page designer's
additional use of CSS. Many of the text elements are found in the 1988 ISO
technical report TR 9537 Techniques for using SGML, which in turn covers the
features of early text formatting languages such as that used by the RUNOFF
command developed in the early 1960s for the CTSS (Compatible Time-Sharing
System) operating system: these formatting commands were derived from the
commands used by typesetters to manually format documents.
Markup:
HTML markup consists of
several key components, including elements (and their attributes),
character-based data types, character references and entity references. Another
important component is the document type declaration, which triggers standards
mode rendering.
The following is an
example of the classic Hello world program, a common test employed for
comparing programming languages, scripting languages and markup languages. This
example is made using 9 lines of code.
<!DOCTYPE html>
<html>
<head>
<title>This is a title</title>
</head>
<body>
<p>Hello world!</p>
</body>
</html>
(The text between
<html> and </html> describes the web page, and the text between
<body> and </body> is the visible page content. The markup text
'<title>This is a title</title>' defines the browser page title.)
This Document Type
Declaration is for HTML5. If the <!DOCTYPE html> declaration is not included,
various browsers will revert to "quirks mode" for rendering.
Elements:
Main article: HTML element
HTML documents are
composed entirely of HTML elements that, in their most general form have three
components: a pair of tags, a "start tag" and "end tag";
some attributes within the start tag; and finally, any textual and graphical
content between the start and end tags, perhaps including other nested
elements. The HTML element is everything between and including the start and
end tags. Each tag is enclosed in angle brackets.
The general form of an
HTML element is therefore: <tag attribute1="value1"
attribute2="value2">content</tag>. Some HTML elements are
defined as empty elements and take the form <tag
attribute1="value1" attribute2="value2" >. Empty
elements may enclose no content, for instance, the BR tag or the inline IMG
tag. The name of an HTML element is the name used in the tags. Note that the
end tag's name is preceded by a slash character, "/", and that in
empty elements the end tag is neither required nor allowed. If attributes are
not mentioned, default values are used in each case.
Element
examples
Header of the HTML
document:<head>...</head>. Usually the title should be included in
the head, for example:
<head>
<title>The Title</title>
</head>
Headings: HTML headings are defined with the <h1>
to <h6> tags:
<h1>Heading1</h1>
<h2>Heading2</h2>
<h3>Heading3</h3>
<h4>Heading4</h4>
<h5>Heading5</h5>
<h6>Heading6</h6>
Data
types:
HTML defines several data
types for element content, such as script data and stylesheet data, and a
plethora of types for attribute values, including IDs, names, URIs, numbers,
units of length, languages, media descriptors, colors, character encodings,
dates and times, and so on. All of these data types are specializations of
character data.
Delivery:
HTML documents can be
delivered by the same means as any other computer file. However, they are most
often delivered either by HTTP from a web server or by email.
HTTP:
Main article: Hypertext Transfer Protocol
The World Wide Web is
composed primarily of HTML documents transmitted from web servers to web
browsers using the Hypertext Transfer Protocol (HTTP). However, HTTP is used to
serve images, sound, and other content, in addition to HTML. To allow the web
browser to know how to handle each document it receives, other information is
transmitted along with the document. This meta data usually includes the MIME
type (e.g. text/html or application/xhtml+xml) and the character encoding (see
Character encoding in HTML).
In modern browsers, the
MIME type that is sent with the HTML document may affect how the document is
initially interpreted. A document sent with the XHTML MIME type is expected to
be well-formed XML; syntax errors may cause the browser to fail to render it. The
same document sent with the HTML MIME type might be displayed successfully,
since some browsers are more lenient with HTML.
HTML Application
An HTML Application (HTA;
file extension ".hta") is a Microsoft Windows application that uses
HTML and Dynamic HTML in a browser to provide the application's graphical
interface. A regular HTML file is confined to the security model of the web
browser's security, communicating only to web servers and manipulating only
webpage objects and site cookies.
SGML-based versus XML-based HTML
One difference in the
latest HTML specifications lies in the distinction between the SGML-based
specification and the XML-based specification. The XML-based specification is
usually called XHTML to distinguish it clearly from the more traditional
definition.
However, the root element
name continues to be 'html' even in the XHTML-specified HTML.