Contents of this Document
1 Tags and markup codes - Text description signs
2 The structure of a HTML Document
3 Creating texts with HTML
3.1 Headlines
3.2 Formatting text
3.3 Paragraphs and Line Breaks
3.4 Lists
3.4.1 Unordered Lists
3.4.2 Ordered List
3.4.3 Definition List
3.5 Creating Tables
4 URL s - Reference to other files
5 Links - Text becomes Hypertext
5.1 Linking to Local Documents
5.2 Linking URL s
6 Literature
1. Tags and markup codes - Text description signs
What distinguishes an HTML file from any other plain-text file on the computer is the presence of simple markup codes. These markup codes are entered in plain text and are always surrounded by special markers called tags ( < > ) to set them off fr
om the substantive text of the document. All the codes are typed just right into the HTML document and will be visible there. HTML uses the tags as symbols to signal the beginning (the <) and end (the >) of markup instructions. Every opening tag must ha
ve a corresponding closing tag.
Most markup codes must appear in pairs. Not only must a markup code start with <some-code>, but also the text to with the markup code applies must end with a corresponding markup code, usually </some-code> to show the en
d of the markup instructions. The ending markup code always begins with a forward slash.
This example shows an HTML fragment containing start and end markers for a headline:
<H2>This is a Level Two Headline</H2><H1> and an ending one, </H1> surrounding the actual text of the headline.<H1> is the same as <h1> and <body> (the code for demarking the body of a HTML document) is the same as <BoDy> or <bOdY>.<HTML><HEAD><TITLE>The title of the document</TITLE></HEAD><BODY>
The text of the document...</BODY></HTML>
Every HTML document must begin with the <HTML> tag and end with the </HTML> tag, declaring the document an HTML document.
All HTML documents are devided into two parts - the head and body. The Web browsers need to distinguish between them to interpret the documents properly. After the beginning HTML tag the <HEAD> tag follows. The Head of a document contain
s the <TITLE> tag. The title of a document is usually displayed just above the URL or Location box at the top of the browsers window. Of course both, <HEAD> and <TITLE> tags need closing equivalents cont
aining a forward slash.
3. Creating texts with HTML
To create texts with HTML we need to know more about the markup tags we need to create headlines, paragraphs, lists and styles.
3.1 Headlines
HTML allows to create headlines of six various sizes: <H1> to <H6>
It is important to surround the headline with a start and a stop headline tag:
<H1>Überschrift 1</H1><H2>Überschrift 2</H2><H3>Überschrift 3</H3><H4>Überschrift 4</H4><H5>Überschrift 5</H5><H6>Überschrift 6</H6>| Meaning | Logical Tag | Physical Tag | Example |
|---|---|---|---|
| Bold/Emphasis | <Strong> | <B> | <B>Bold<B> |
| Italic | <EM> | <IT> | <IT></IT> |
| Typewriter (Code) | <Code> | <TT> | <TT> Typewriter<TT> |
| Citation | <Cite> | no phys. tag | <Cite>Citation</Cite> |
<br> inserts a line break. It does not need a closing tag!
<P> tag is interpreted by Web browsers to cause display of a blank line between the matter preceding the tag and that following it. Multiple <P> tags are ignored, so it is not possible to use them to a
dd extra blank lines. There is no need for a closing tag.
<HR> is a tag the inserts a horizontal line running over the whole page. There is no need for a closing tag.
| HTML Source Code | Shown in Web Browser |
|---|---|
For more information, contact<P>John Doe <BR> 123 Main Street <BR>Hamiltown, USA 5555 <P>Further text of the document | For more information, conta
ct John Doe Further text of the document1 |
<UL> togeth
er with the generic tag <LI>. The list shown above would contain the following syntax: <UL><LI>ordered list<LI>definition list</UL><LI> tag is used in all types of HTML lists.
<OL>. Our example would then look like this:
| HTML Source Code | Shown in Web Browser |
|---|---|
<OL><LI>unordered List<LI>ordered List<LI>definition List</OL> |
|
| HTML Source Code | Shown in Web Browser |
|---|---|
<H1> HTML List Elements</H1> <DL> <DT>The UL Tag <DD> Creates an unordered list <DT> The OL Tag <DD>Crea
tes an ordered list</DL> |
HTML List Elements
|
<TABLE> tag. This allows you to define a caption and to differentiate header and data cells. Cells can be merged, e.g. to define a header which spans two columns. A simple table could look like this:| Year | Month | Day |
|---|---|---|
| 1972 | June | 23rd |
| 1982 | October | 7th |
This table would be defined by the markup:
<table border><caption>A simple table</caption><th>Year<th>Month<th>Day<tr><td>1972<td>June<td>23rd<tr><td>1982<td>October<td>7th<tr></table> |
The "border" attribute acts as a hint to the browser to draw lines enclosing each cell. The <TH>tag (Table Header) precedes header cell text and the <TD> tag (Table Data Cell) precedes
data cell text. The <TR> tag (Table Row) is used to separate table rows. By default text is centred in each cell. Header text is shown emphasised.
4. URL s - Reference to other files
A URL is a Uniform Resource Locator. A URL is the complete address of a file located somewhere in the Internet. Mr. Gibbon s page of "Summer classes 1996" in the WWW for example has the following address:
| Element | URL type | Name of Server | File |
|---|---|---|---|
| Example | http: | //coral.uni-bielefeld.de | /Classes/Summer96 |
| Meaning | HyperText Transfer Protocol: The way Web servers and clients communicate over the network. | Name of the server on which the file that is addressed is located. | Exact location of the file t hat is referred to. |
5. Links - Text becomes Hypertext
Hyperlinks are the coloured/highlighted words and phrases you see in Web documents. When you click them, you jump to other documents on the local Web server or documents or services somewhere out on the Internet, across town or halfway around the world.
Hyperlinks are the elements that connect a vast amount of information in a huge electronic net, the World Wide Web.
Hyperlinks are based on so called "anchor" HTML tags. Like all HTML tags, the anchor tags must open with the "<" symbol and close with the ">" symbol.
This is the general syntax:
<A COMMAND="target">Highlighted Text</A>
<A COMMAND="target">
</A></A> states the end of the anchor tag. When the HTML document is displayed, the material represented by "Highlighted Text" in the above example appears highlighted, and will be an active hyperlink. Two important types of link
s can be distinguished:
<A Href="doc2.html">Dokument 2</A>
<A HREF=</A>