a glossary of HTML code. To follow along, download
the sample webpage.
It will appear in a second window, so that you can keep looking
at it while you study the glossary of codes below. This glossary
will take you step-by-step through the codes of that sample page,
from top to bottom.
this tutorial are used to help you identify what
is code, what is
webpage content, and what it all means.
tells the computer that this page will use HTML codes, also called
"tags" (any code placed between <
and > is an HTML tag). This <html> tag
is always required.
is necessary because certain information goes into the heading
of the page and must not show up in the body of the webpage; this
is always required.
for understanding HTML</title>
puts a title for the page at the very, very top of the browser.
designers, design, website, webwork, webmasters, course, HTML,
gives Internet search engines some keywords that will find your
website when a person does a search using any of these words;
this is optional, but very helpful.
the Good News Web Designers Association!">
gives the Internet search engines a description of your website
that people will read in the search results; this is optional,
but very helpful. If you don't use this code, the search engines
will rely on the first words on your page.
tells the computer that the heading section is ending, and the
body of the webpage is about to begin; this is always required.
tells the computer three things:
- The <body>
tag tells the computer that the body of the webpage is now beginning,
and everything here on out will be visible to people; <body>
is always required.
The body tag can have more (optional) information in it, such
as the name of the graphic (gnwaside.jpg) that
will be used as the background image of the page.
This gives the page a background color of white; white has the
most professional look. Even if you use a background graphic,
assign a bgcolor, in case the graphic fails to load.
The color of all links on this page will be green. Without this
link information in the body tag, all links will be the default
telling the first line of text (which happens to be a title) to
be centered on the page.
face="Times New Roman"
determines what the text will look like, including the size. Without
this, it defaults to what the user has their computer set to.
Then, of course,
we have to tell it to stop:
is used to indent the text.
begins a new paragraph. This time it's not centered.
LET'S LOOK AT THE TABLE. In it's simplest form, the HTML
code for a table is:
<table> initiates a table
<tr> opens the horizontal side of the table
<td> opens the vertical side of the table
But you can
give it more information, as I've done in the sample:
means the edge of the table and its cells; "0" means
no borders will show; "1" = the smallest border; "2"
is a little bit thicker; etc.
puts a margin around the contents of the table; the higher the
number, the more empty space there will be. If you don't use
this code, the table will automatically have a cellpadding of
means how the table cells are spaced next to each other; "0"
leaves no gaps between cells, 1 gives it a small gap, 2 a larger
gap, etc. If you don't use this code, the table will default
indicates how wide you want the table to be. If you don't use
this code, the content inside the table will determine how wide
the table gets, but the table will actually load faster if it
doesn't have to figure that out. Make sure the width will fit
into even the smallest resolution monitors, which is 640 pixels
is rarely needed, but if you want to prescribe exactly how long
the table is, give height a setting just as you did width.
the graphic on the page.
src stands for "image source", that is, where
in the directory to find the graphic.
- The ../../
in front of gnwda.gif tells the
computer to find the image in the main directory, which is two
directories up from here (this webpage is located in a sub-directory
of a sub-directory of the top directory.
and HEIGHT tell the computer what size space
to allot on the webpage for the image. "80" is roughly
.8 inches and "118" is 1.18
inches. If you need to change the size of the image, you can
do it by changing the size of these numbers, but the quality
is blurred; it's better to change the size of the image in a
graphics editing program.
closes the vertical side of the table
a new cell by opening the vertical side again. The valign
stands for vertical alignment. If the contents of this second
cell are shorter than the contents in the first box, they will
float in the middle (which is the default setting). I've position
the text at the top.
a centered paragraph and <font face="Arial"
defines the text style, size, and color. Color codes are a combination
of letters and/or numbers following the # sign. You shouldn't
have to figure out the right color number; your webpage designing
software should do it for you. The color can
also be labeled as "blue" or "red" or a small
number of other standard color names. See our color
chart for some of the color codes you can use.
(a new paragraph begins) It's used to better
organize your page and can be used to put multiple text lines
next to a graphic. It covers 75% of the screen, so the image doesn't
overlap the background image down the left side.
the <td> command that was at the beginning of the table
</tr> undoes the last <tr> command in the table
</table> undoes the <table> command that started
<p></p> puts an empty
paragraph, i.e., extra space, before the next table.
In the next
margin is set to 3, the width of the table to 500
pixels, gives the table a background color, and centers
the table on the page.
If you have
a table with more than one cell and want to have different colors
in each cell, instead of putting the bgcolor code in the <table>
tag, you will put it in the <td> tag.
TEXT GOES HERE</i></b></p>
these codes for the text:
bold font (the tag <strong> does the
italicizes the text
ends the paragraph
some text, which here is relying on all the default settings,
therefore there are no font tags:
A table is used here, with a width of 500
indents the text that follows and indicates that each line will
be numbered sequentially.
point of information.</li>
indicates this is a line of text that should be numbered (note
that each line begins with <li> and ends
indicates this is a line of text that should be numbered.
</ol> ends numbered text indenting.
indents the text that follows and indicates each line will be
bullets instead of a numbered list.</li>
indicates this is a line of text that should be bulleted.
this look nice?!</li>
indicates this is a line of text that should be bulleted.
</ul> ends bulleted text indenting.
indents the text that follows.
can also indent your text without using numbering or bullets...This
is the <blockquote>
< and >
are codes that were automatically inserted in the source code
to tell the computer that the < and > around the word "blockquote"
in page view are not tag indicators.
Next, the following tags end this table.
<blockquote> followed by
puts an indented dividing line across the page
</blockquote> stops the indenting
NEXT WE EMBED
A TABLE WITHIN A TABLE
table is invisible to the viewer, because there are no borders
assigned and no background color, viewers cannot see the table
framing, but they do see a nicely organized, eye-appealing block
of text surrounding a graphic.
the width of this table is 600 pixels.
table is opened immediately after the outer table is opened.
This newest table holds the graphic and enables the text to flow
around it because it's been assigned the attribute align="right":
This alignment attribute throws the graphic's table to
the right side of the larger, outer table, and thus the text that
is written after the table will move up and fill in the left side,
appearing next to the table. The text wraps itself around the
puts the graphic into a table cell (in this table, there is only
one cell.) Because the width and height of the graphic are assigned,
the browser does not have to calculate it and thus the graphic
loads more speedily. If you leave out the size, the graphic will
load last and slower.
Then the code
to end the graphic's table is given, followed by the beginning
of a paragraph of text, which in this case is a single line of
to wrap text around a picture:</font> enlarges
the text one size bigger than the default setting, which would
have been "3". By using </font> at the
end of this line, we stop size "4" and resume the default
in the middle of the next paragraph of text, which begins with
"When you want your text to wrap around
a graphic...", and in the paragraph that comes after
it, I changed the color for the text align="right"
text look odd in the source code? "
and " are both the
HTML code that tells the computer that the quote " marks
are really quote marks and not part of the " coding you see
Now look at
the next paragraph, which starts with:
can achieve the same spacing without using a table at all.<br>
puts a break in the text. If we were to use the <p>
tag, the break is similar to double-spacing between paragraphs
in a word processing program. But the <br> tag single-spaces
The last paragraph
is a link taking people back to the home page:
to our Home Page</a></p>
The a href code tells the browser what
URL to go to when the visitor clicks on the link, and it makes
an active hyperlink out of whatever follows the tag (in this case,
it's the text "Return to our Home Page"; instead of
text here, a graphic could be used, such as img src="graphic.jpg").
are automatically underlined and colored blue, unless you've changed
the link color in the <body> tag up top,
as we did (remember when it was assigned the color green?).
will be automatically be outlined in the link color, unless you
put border="0" in the graphic's <img
after the text (or image) indicates that nothing after this will
be part of the link. If you forget to put this in, the entire
remaining portion of your webpage will be underlined as a link!
end-table code for the outer table is added.
puts a little blank space at the bottom of the page to ensure
that the final line of text won't be butted up against the bottom
of the browser window. is the code
for a blank character space. If you ever need to put more than
one empty space between characters (letters) of a word, use this.
Just as every
HTML <tag> has to have its closing </tag> to end or
undo the code, so must the page end with:
this tutorial as a printable Word Document.