What is HTML?
(We know this Answer: "HyperText Markup Language.")
So, what do these pages that are being sent across
the world by Web servers actually look like? We just saw that each
page on the WWW is actually just a bunch of text (you're reading text
right now) with "notes" in it to tell the browser how to display it.
For example, the text in figure 1 is displayed by a browser as
shown in figure 2.
|
The "notes" in figure 1 (shown in blue)
are HyperText Markup Language (HTML)
tags. An HTML tag is anything between angle
brackets: e.g., <p>
or
<strong>
. The tags <code>
and
</code>
, for example, tell the browser to display
any text between them (in teal) in
computer code-like font
.
Note that we even need to say where to put a line break or paragraph
spaces (with <br>
and <p>
)!
The Markup tells everything about the formatting of
the page!
So: If we want to create Web (HTML) documents, by hand without using a program like DreamWeaver or saving things as HTML from something like Microsoft Word, we just need to learn what the tags are and what they do. No problem.
File -> Save As
and tell it to save as Text
with Line Breaks
).
|
Basics of HTML
(If you don't care to try and learn HTML, skip to the
end.) The basics of HTML (grand flourish here): every document
looks like that shown in figure 3. Know this, and you know
everything there is to know, at least sort of. In fact the only thing
that is left after this is understanding
<tag>
enclosed text</tag>
. <body>
tag to <body bgcolor="blue"
text="white" link="yellow" vlink="orange">
to make the
background color of the page blue, the text white, links yellow,
and visited links orange. Attributes always have the form
attributename="value"
. To be safe, always put
values in quotes. <a href="URL of page">link text</a>
<a href="02labinfo.html">link
to lab info</a>
is a link to the file
02labinfo.html
in the same directory on the same
Webserver as the current page. It's displayed as: link to lab info.
To link to a page that's on a different server, use the full URL:
<a href="http://www.nebrwesleyan.edu/">link to
NWU</a>
is link to NWU, a
link to the Wesleyan home page.
Images are included as files in a similar manner. In
this case we use a img
tag:
<img src="URL of image file">
For example, the tag
<img src="images/on-symbol.gif">
includes the
image on-symbol.gif
from the directory
images
immediately below that in which the current
file is found. It produces the following:
. There are several attributes
of the img
tag:
<img src="images/on-symbol.gif" alt="on-symbol">
:
<img src="images/on-symbol.gif" align="top">
:
<img src="images/on-symbol.gif" align="middle">
:
align="left"
or
align="right"
causes the image to "float" on
one or the other side of the page, with text wrapping
around it.)
|