HTML is based on the Standard Generalized Markup Language (SGML)
and is currently the most popular the language of the Web. HTML
documents consist of two main components referred to as the head
and body. Each of these components in
turn consist of many different tags which tell the Web browser how the
document should be displayed. HTML tags encoded into a Web document
provide the Web browser with general formatting information including
font size and emphasis, paragraphs, horizontal lines, and tables.
HTML tags consist of a left angle bracket (<), a "less
than" symbol, followed by name of the tag. It is then closed by a right
angle bracket (>), or a "greater than" symbol. Tags are paired
with the end tag looking like the beginning tag except a slash (/) precedes
the text within the two brackets ( e.g. <H1> and </H1>). Here
is a minimal HTML document using a few basic tags.
Here's how it appears when viewed by your
browser. The manner in which your a interprets the tags may affect
the way it appears on screen.
It is important to understand that HTML is oriented towards
the structure and content of a document rather than appearance. This is
so each Web browser, either text-based or graphical, can translate the
document appropriately for local display. This way, if a font is not
supported by the user's computer it can be changed
locally to one which is.
There are several advantages to this structure. It allows the author
to focus on content which is well written and easy to understand. Since
HTML is less dependent on layout and formatting codes, an author can make
content changes with fewer edits. Simple edits can be done using simple text
editors rather than loaded into a desktop publishing software and reformatted.
Finally, since HTML documents lack font style and formatting codes they
are generally small in size and can be transferred more quickly across the Internet.
The development of
stylesheets may change how Web pages are created. With a stylesheet, a standard HTML
document is written and marked up with body, headers, paragraphs, etc.
A separate stylesheet is then created which tells the browser how to render
the document. Paragraphs in 12-point Helvetica with 1-inch margins while
headline should be blue, 36-point Times Roman. The stylesheet is then pointed
to in the head of the HTML document.
There are several benefits of separating the structure and style
in this manner. Multiple HTML documents can point to one stylesheet, so
by changing that sheet, you can change the look of an entire Web site.
Since these stylesheets cascade hierarchically, different stylesheets could
be developed for different sections of a Web site. A sheet can set the
header of every document on a site while other sheets can describe the
typography and even override the settings of the sheets before them.