HTML


Hypertext Markup Language (HTML) is the language of the World Wide Web. HTML was developed by CERN, The European Laboratory for Particle Physics, located near Geneva, Switzerland. HTML is a simple way to identify headlines, boldface, italics and links to other documents. HTML can also be used to embed images in hypertext documents, and to display user-interface wigets such as push-buttons, textfields and pull-down menus.

Although HTML is a form of Standard Generalized Markup Language (SGML), the HTML Document Type Definition (DTD) lacks much of the structure that is found in more sophisticated DTDs, such as DocBook. Despite HTML's simpliticy (perhaps because of it), HTML has gained a wide following.

Different Web browsers will display the same HTML document in different ways. That's because HTML, like all SGMLs, doesn't specify how the final document should look; HTML just specifies the document structure.


HTML for Beginners

All HTML documents should have a title and a body, using the following tags:

<html>
<title> Document's Title </title>
<body>
Document's Body
</body>
</html>

In the document's body, you can also use these tags to seperate sections:

<h1> A headline </h1>
<h2> A subhead </h2>
<h3> A smaller subhead </h3>
<h4> A still smaller subhead </h4>
<hr> Draws a horizontal rule
<p> Break between paragraphs
<br> Line break without additional space

These tags control the way that the text is displayed:

<b> Bold </b>
<em> Emphasis </em>
<strong> Over-emphasis </strong>
<i> Italics </i>
<blink> Blinking </blink>
<pre> Preformatted Text </pre> (Fixed-width text preserving line breaks.)
<listing> Fixed width text chunk </listing>
<xmp> Program source </xmp> (Will reproduce angle brackets <,>)
<code> Word change </code>
<tt> Word change also </tt>
<center> Centered </center>
<blockquote> A long quotation block </blockquote>

Special Characters

&lt Less than ( < )
&gt Greater than ( > )
&amp Ampersand ( & )
&reg Registered trademark ( ® )
&copy or &#169 Copywrite ( © )
&uuml or &#252 U-umlaut ( ü )
&#189 One half ( ½ )

Images and Links:

<img src="drawing.gif"> Includes the image file drawing.gif
<a href="http://www.cpg.com/info.html"> A hyper-link </a>

Lists and Tables:

<ul> An unnumbered list
<li> cats Each list element
</ul> End of the unnumbered list

<ol> A numbered, or ordered, list
<li> orange
</ol>

<dl> A definition list; for example, a glossary
<dt> CPG The term being defined
<dd> Computer Publishing Group (the definition)
</dl> End of definition list

Many of these tags can take optional arguments:

<hr width="50%"> Draws a horizontal line halfway across
<IMG ALIGN=MIDDLE SRC="line_sun.gif" ALT="Sun Bar">
Specifies that an image should be aligned in the middle of the screen, with the words "Sun Bar" displayed if the viewer cannot display the file line_sun.gif.

Finally, HTML can be used to display push-buttons, forms, pull down menus and radio buttons:

<form action="url"> A form, which calls URL when it is activated
<input type=type name="a name" value="default value" size=40>

Where type can be:

text Text entry, the default
password Text entry, no character echo
checkbox A toggle button
radio A radio button for other toggles with the same name
submit A push button that causes a query to be sent to URL
reset A push button that causes the form to be reset
</form> End of form


from SunExpert Magazine May 1995, p. 63-64