|
Hypertext
Markup Language
As we discussed in the first lesson,
HTML is composed of a set of elements that define a document and
guide its display. By using HTML, you will be able to leave invisible
instructions all over your web page that will help to explain how
to display your page.
How It
All Works
A webpage, in its raw form, is simply a text file ending with the suffix
.html or .htm. For example, if you were to display this file on your
computer in its raw form, you will see nothing but text interspersed
with HTML tags. That means no background, no pictures, no animations,
nothing but text and code. This raw text file is referred to as the source
code of a web page.
So how does this boring and dry text
file become a webpage with color and life and vitality? There are
programs that take these text files, read them in the raw, and display
them on your monitor in the manner the file's HTML suggests. This
program is called a browser.
HTML Tags
If you look at the source code for any web page (View Source), you
will notice HTML commands interspersed throughout the document.
These commands are called tags and they tell the browser
how to display the text, layout, and images within the document.
HTML tags are easy to recognize because they are always between
angle brackets: <Like This>
The
first tag we will learn is the BOLD tag. It is simply the letter "b" placed
between two angle brackets and looks like this: <b>
Tags
almost always work in pairs. There are a few exceptions, but most
of the time there is an opening tag
and a closing tag. The closing tag for Bold looks likes this: </b>
Notice that the closing Tag the same
as the opening tag except for the /mark. All closing tags have the
/. Any text placed between the opening and closing Bold tags will
look thicker and larger than the rest of the text on the page.
This
is NORMAL text.
<B>This is BOLD text</B>
Two more simple tags are EMPHASIS
and BIG
<EM>EMPHASIS</EM>
<BIG>BIG</BIG>,
The <HTML> </HTML> Tags
Every web page written in HTML has essentially two parts: the Head
and the Body. The HTML Tags tell your computer that everything
between these two tags is an HTML document. You will always begin
your page with the opening HTML tag and end it with the closing
/HTML tag.
NOTE: HTML Tags can be typed in lowercase or CAPITAL letters,
or even a mix of lowercase and capital letters.
The <HEAD> </HEAD> Tags
The first part of your document is called
the HEAD. The HEAD is where you will put the title that appears on
somebody's navigation bar when they call up your page.
The <BODY> </BODY> Tags
After the Head is the Body. This is
where the content, images and links will be put.
The Skeleton
Here is the HTML for a simple webpage. See if you can figure it out
using what you have learned thus far.
<HTML>
<HEAD>
<TITLE> MY HOMEPAGE</TITLE>
</HEAD>
<BODY>
Hello, this is <EM>MY</EM> webpage! Welcome!
</BODY>
</HTML>
See how these tags all have a beginning
and an end, and how all the text is between the BODY tags? Notice,
also, how the document begins and ends it with a pair of HTML tags.
Without those, your computer will not know how to read the document.
|