Along came archie, a program to locate ftp sites using a keyword search. This program worked by collecting data at archie servers (located at some sites) and allowing archie clients to connect to the servers to search.
The next development was gopher (created at the University of Minnesota), a utility which combined several tools (a file viewer, ftp and telnet) in a single easy-to-use menu-driven interface.
At the same time, the publishing industry had been experimenting with so-called hypertext documents (electronic documents with nonlinear organization of data) -- on single machines. A standard called SGML (Standard Generalized Markup Language) was developed to write hypertext documents in free ascii-text (similar to Latex, troff etc).
Ideally, SGML should be integrated with TCP/IP to provide links across the network. But SGML is large and complex. Thus came HTML (HyperText Markup Language), a much simpler formatting language developed by CERN in Switzerland that uses TCP/IP.
The whole idea in using HTML is to display more than text, that is, formatted text and images. For this, a "browser" is needed - most often, a browser written for a windowing package such as xmosaic (the first browser) written for X-windows.
HTML documents are written in ascii text,
with commands specified by particular sequences of characters. Commands
in HTML usually consist of 3 components:
For example, to specify the title of a document,
such as, Red Riding Hood,
you would use the <title>
command:
<title> Red Riding Hood </title>Note that
Some characters, such as "<", ">" and "&" are used exclusively for HTML commands. To actually display these special characters in a document, see the section on special characters below.
Here's the basic structure of an HTML document:
<html> <!-- This is an internal comment; it won't be displayed --> <!-- Note the exclamation mark and the two dashes on either side --> <head> <title> Red Riding Hood </title> </head> <body> Once upon a time, in a land far far away, there lived... </body> </html>Now, HTML is written in free text, so the above document could just as well be written into a text file as:
<html> <!-- This is an internal comment; it won't be displayed --> <!-- Note the exclamation mark and the two dashes on either side --> <head> <title> Red Riding Hood </title> </head> <body> Once upon a time, in a land far far away, there lived... </body> </html>
NOTE:
<head> blah-blah
<\head> part
of the document is used to specify a title (so that it can be displayed
in the title window of a browser).
An important point needs to be made here: you, the
author of an HTML document, do not have much control over how a browser
will display your document. Some control, but not much. This is because
a browser may be dynamically configured to various window sizes and the
designers of HTML wanted to keep the language simple enough to let browsers
decide "what looks nice". You, the author, can decide paragraph breaks,
some fonts, italics, a rough sense of font sizes and the like - but eventually
a browser decides what to display. Thus, your document could look quite
different when viewed through different browsers.
OK, on to formatting. That is, creating paragraphs,
using italics, selecting fonts, and other goodies that we all want for
our cheesy documents.
Let's cover a few simple HTML ideas by embellishing the example shown earlier:
<html> <head> <title> Red Riding Hood </title> </head> <body> <h1> Red's Early Years </h1> <h2> Birth </h2> Once upon a time, in a land far far away, there lived... <h2> Pre-School </h2> When she was three, her mother enrolled her in <i> Grimm's DayCare </i> ... <h1> Red Goes to High-School </h1> <h2> Red Sets up a Homepage </h2> Acquiring a 486-based Linux machine running X-windows was the first step in Red's long journey from internet initiate to system guru. <p> She set up the soon-to-be hottest internet site: <hr> http://red.hood.com <hr> <address> The Brothers Grimm </address> </body> </html>The example shows
Command Description Start tag Stop tag ------------------------------------------------------------------- <html> </html> HTML document indicator <head> </head> Document head <title> </title> Title (usually in <head> section) <body> </body> Document body <address> </address> Document author info <!-- --> Comment <h1> </h1> Level-1 heading <h2> </h2> Level-2 heading . . . <h6> </h6> Level-6 heading <i> </i> Italics <em> </em> Emphasized text - similar to italics <b> </b> Bold face <strong> </strong> Strong - similar to bold <tt> </tt> Teletype <strike> </strike> Strike-through <var> </var> Variable - similar to italics <cite> </cite> Citation - similar to italics <code> </code> Code - similar to teletype <kbd> </kbd> Keyboard - similar to teletype <samp> </samp> Sample - similar to teletype <dfn> </dfn> Definition - for definitions <key> </key> Keyword - for keywords <p> End a paragraph, start a new one <br> Line break - start a new line <hr> Horizontal rule <pre> </pre> Preformatted text - format exactly as entered in ascii. <blockquote </blockquote> To set apart a quote
To create an itemized list, consider the following
example:
<body> <h2> Red Riding Hood's shopping list </h2> <ul> <li> Picnic basket <li> Iced tea <li> Red items <ul> <li> Red delicious apples <li> Red sneakers <li> Red jacket with hood </ul> <li> Safety items <ol> <li> Magnesium flare <li> Cellular phone <li> Uzi </ol> </ul> </body>Observe that an unordered list list is defined by <ul> list of things </ul> and an ordered list by <ol> list of ordered items </ol> . Each item is specified by a <li>. .
Unordered lists are bulleted and ordered lists are numbered. There are also <menu> and <dir> types of lists, both being similar to unordered lists. Lists can be nested within other lists, as the example shows.
HTML also provides a description list to pair up, for example, keywords and definitions in a glossary. For example:
<dl> <dt> HTML <dd> A language spoken by nerds <dt> Java <dd> A language spoken by major nerds </dl>You get the idea.
Character code Description ----------------------------------------------------------- & l t ; the less-than symbol & g t ; the greater-than symbol & a m p the ampersand symbol
Suppose we have created the following html
file (called, say, red.html)
in the current directory, along with the file home.html
and a subdirectory early
containing the files birth.html and
preschool.html.
<html> <head> <title> Red Riding Hood </title> </head> <body> <h1> Red's Early Years </h1> <a href="early/birth.html"> Birth </a> <a href="early/preschool.html"> Pre-School </a> <h1> Red Goes to High-School </h1> <a href="home.html"> Red Sets up a Homepage </a> </body> </html>Notice the new command used above - the anchor command - with the general form <a href="an address"> some text that will be highlighted </a>. When a browser displays this document, the text between the anchor tags will be underlined or highlighted. Mouse clicks on this portion will result in following the address to a new HTML document. The start tag provides the information needed to find the new html document (which has its own header, body etc).
http://www.seas.gwu.edu:80/tales/fairy/modern/masterlist.htmlIt specifies the following:
Named anchors allow you to mark a place in the text to point to. For example, suppose the file stories.html contains a number of stories, whereas masterlist.html contains a list of story titles such as Red Riding Hood. Each title has a link to the appropriate story in stories.html. For example, here is a portion of masterlist.html:
<ul> <li> <a href="stories.html"> Hansel and Gretel <a> <li> <a href="stories.html"> Jack and the Beanstalk <a> <li> <a href="stories.html"> Red Riding Hood <a> <li> <a href="stories.html"> Aesop's Fables <a> </ul>Let's assume that stories.html contains the tales (each with hyperlinks to other files. Now, by clicking on any stories in masterlist.html, the browser will take you to the top of the stories.html file. You then have to scroll down to the story you want. To avoid this problem, we simply mark each story beginning in the file stories.html and use the mark in the href specification. For example, in stories.html, let us mark Red Riding Hood as follows:
<h1> <a NAME="red"> Red Riding Hood <a> </h1>Now, in the appropriate href part in masterlist.html, we specify this mark:
<li> <a href="stories.html#red"> Red Riding Hood <a>Observe the hash symbol being used to specify a named anchor. You can use named anchors for rapid movement within a single HTML document.
http://www.seas.gwu.edu/tales/fairy/modern/masterlist.htmlThen, we have seen that links in the file masterlist.html are created by giving an address in the href part of an anchor. We can either provide a full address or a partial or relative address. Above, we saw an example of a relative address:
<a href="stories.html"> Red Riding Hood <a>We could have also given the complete address:
<a href="http://www.seas.gwu.edu/tales/fairy/modern/stories.html"> Red Riding Hood <a>
MIME (Multipurpose Internet Mail Extensions)
is a standard that incorporates many well-known file formats. The idea
is that the browser doesn't handle these formats and instead calls a "plug-in",
a program that knows what to do with the data. Thus, for "postscript" files,
a postscript viewer is called by the browser. You can, by setting options
in the browser, decide which application programs (plug-ins) handle which
file extensions. Here are some common extensions (some of which, like .gif,
are directly handled by the browser).
<body> <h1> The Next President of the United Brewpub Tasters of America </h1> <img alt="my mugshot" align=bottom src="mypicture.gif"> </body>With the <img ... > command, we specify the source file (mypicture.gif), an alignment for the first following line of text, and an alternate ascii string (my mugshot) for browsers that don't support images.
<body> <h1> The Next President of the United Brewpub Tasters of America </h1> <a href="bio.html"> <img alt="my mugshot" align=bottom src="mypicture.gif"> </a> Click on my picture to get my biodata </body>
http://www.seas.gwu.edu/~simhais really the file public_html/index.html, which the webserver knows to get. (You don't have to understand this last point). Make sure that you grant public access to this directory and to the files you place in the directory.
http://www.seas.gwu.edu/~simha/cv.htmlthen others can `open' this URL and get the file.
BEER RATING Chilled Cool ---------------------------------- Dork Pilsener 5.6 6.7 Blech Dark 7.3 7.1 Bugwizer 1.2 0.5 Handiken 4.4 6.5Now, in HTML:
<table border> <th> BEER </th> <th colspan=2> RATING </th> <tr> <th> </th> <th> Chilled </th> <th> Cool </th> <tr> <td> Dork Pilsener </td> <td> 5.6 </td> <td> 6.7 </td> <tr> <td> Blech Dark </td> <td> 7.3 </td> <td> 7.1 </td> <tr> <td> Bugwizer </td> <td> 1.2 </td> <td> 0.5 </td> <tr> <td> Handiken </td> <td> 4.4 </td> <td 6.5 </td> <tr> </table>And now the explanation:
<body> <h1> The Next President of the United Brewpub Tasters of America </h1> <a href="bio.html"> <img alt="my mugshot" align=bottom src="mypicture.gif"> </a> Click on my picture to get my biodata <h1> What's new in this homepage </h1> <!--#include file="whatsnew.html"> </body>The whatsnew.html is continually updated.
<FONT COLOR="#000000">black </FONT> <FONT COLOR="#FFFFFF">white</FONT> <FONT COLOR="#FFFF00">yellow</FONT> <FONT COLOR="#FFDEAD">beige</FONT> <FONT COLOR="#CD853F">dark beige</FONT> <FONT COLOR="#00FF00">bright green</FONT> <FONT COLOR="#008000">dark green</FONT> <FONT COLOR="#00FFFF">light blue</FONT> <FONT COLOR="#000060">navy blue</FONT> <FONT COLOR="#000080">dark blue</FONT> <FONT COLOR="#FFB6C1">light pink</FONT> <FONT COLOR="#FF1493">dark pink</FONT> <FONT COLOR="#FF0000">red</FONT> <FONT COLOR="#B22222">dark brick red</FONT> <FONT COLOR="#FFF8DC">lightly off-white</FONT> <FONT COLOR="#FA8072">flesh-pink</FONT> <FONT COLOR="#FFF8DC"></FONT><FONT COLOR="#00FF00"></FONT>Fonts also come in "faces" such as roman or helvetica. Use the face attribute for a font family and the size attribute for a size.
Note that both face and size depend entirely on what the browser supports. For example, Netscape 3.0 only supports roman and helvetica. Here are some examples:
<font face="verdana" size=3> [verdana] </font> <font face="arial" size=3> [arial] </font> <font face="helvetica" size=3> [helvetica] </font> <font face="roman" size=3> [roman] </font> <font face="roman" size=1> [roman1] </font> <font face="roman" size=5> [roman5] </font> <font face="helvetica" size=4> [helvetica4] </font>
<body bgcolor="#FFFFFF">Similarly the background for table or even a row inside a table can be set. (More detail below).
<table height=30> <tr> <td> </td> </tr> </table>If you look at the source for almost any sophisticated page, you will find tables being used for layout. Typically, a top "bar" contains information related to an organization and a "side bar" contains navigational help.
Use cellpadding and cellspacing to determine the white space around the table data and the spacing between individual cells.
Use border to specify the thickness of a border. For example:
<table cellpadding=2 cellspacing=5 border=10> <tr> <td> A1 </td> <td> A2 </td> <td> A3 </td> </tr> <tr> <td> B1 </td> <td> B2 </td> <td> B3 </td> </tr> </table>Although a table will expand to contain its elements, you can fix the width and height, with width and height tags, e.g.
<table cellpadding=10 cellspacing=3 border=1 width=100> ... </table>Likewise, a background for the table can be specified with the bgcolor attribute, e.g.,
<table cellpadding=10 cellspacing=3 border=1 width=500 bgcolor=FFFF00> ... </table>Suppose you want to color the border. You can do this by placing a table inside another. For example, to get the borders to be red, place the table inside another table whose background color is red.
<table bgcolor=DC143C> <tr> <td> <table border=1> ... </table> </td> </tr> </table>Use rowspan and colspan for entries that span multiple columns or multiple rows.
Similarly use the align attribute to decide how each entry is justified within a cell.
The following complex example demonstrates many of these features: Here,
<table bgcolor=DC143C> <tr> <td> <table cellpadding=10 cellspacing=3 border=1 width=500 bgcolor=FFFF00> <tr> <td colspan=2 align=right> A1 </td> <td align=center> A2 </td> </tr> <tr> <td valign=bottom> B1 </td> <td bgcolor=FFDEAD> B2 </td> <td width=100> B3 </td> </tr> </table> </td> </tr> </table>