Chemistry 524 HTML Primer
Head tags
Indicates the head-section of the page. Must end with . You can put a
lot of tags inside the HEAD tag which will set some preferences for the page,
but only the TITLE tag is used frequently. Put it inside the -tag.
text
Use it inside the tag. Sets the title of the page (usually the window
name) to "text". In Netscape 1.1N (no other browsers, no other versions of
Netscape) can you 'animate' the title by inserting more than one TITLE tag.
Sets the standard URL for files used in the page. Make it possible to set a
pictures path to just the name, if it is in the BASE HREF folder. Using TARGET
open all links in a (new) window or frame named "text". If text is "_blank",
the window will be unamed. TARGET is an Netscape extensions, supported in
Explorer. (IE NS)
Sets the standard size of the text. It can also set the default font and color
of the text. If font1 isn't available in the system, font2 will be used, and so
on. BASEFONT is a Netscape extension, supported in Explorer. FACE and COLOR is
currently not supported in Netscape. (IE NS)
Plays a background sound while the page is viewed. The sound must be in the
.au, .wav or .mid formats. LOOP sets the number of times to play the sound, or
INFINITE to play it over and over until the page is closed. Note! Netscape 2.x
does only display the background and nothing more (text,pictures, etc) if
BGSOUND is used! IE
Tells the browser that the page is a searchable index. When the page is opened,
a dialogbox will ask the user to enter a keyword. HREF is the url to which it
will be sent. PROMPT is the text to be displayed in the dialog. If PROMPT isn't
defined, this text will be used: "You can search this index. Type the keyword(s)
to search for:". Some resources says that you should use ACTION instead of HREF.
PROMPT is not defined in the HTML-standard. (IE NS)
Used as a toolbar or banner for the page, but it is not supported in all
browsers. It can also define a linked style sheet, please see the Style
sheets-chapter for more information. NAME is the name of the object, HREF is
the url to a page and REL one of the following attrbutes. Using REL=Home, the
link will point to a homepage. ToC goes to a table of contents, Index to an
index page, Glossary to a page used as a glossary, Copyright to a page with ©
information, Up to a page used as a parent for the current page, Next and
Previous to the next or previous page, Help to a help page and finally Bookmark
to a bookmark (link) page. You can also use Banner. which will use the HREF page
as a banner that won't be scrolled with the rest of the page (like a frame).
.
. IE NS
IE NS
Body tags
The actual content pf the page. Be sure to only use one pair of BODY-tags! The
following properties can be used:
BACKGROUND="url"
Sets the background of the page to a specified picture. This is an HTML 3.2 tag.
BGCOLOR="color"
Sets the background to an RGB color, usually gray.
TEXT="color"
Sets the standard color of the text, usually black.
LINK="color"
Sets the color of the unvisited links, usually blue.
VLINK="color"
Sets the color of the visited links. In Netscape, if not set, usually defaults
to magneta and Explorer, if not set, usually defaults to red.
ALINK="color"
Sets the color of the links at the moment the user clicks on them, usually red.
NS
BGPROPERTIES=fixed
Defines BACKGROUND as a non-scrolling picture. IE
LEFTMARGIN=n
Defines the left margin of the page. IE
TOPMARGIN=n
Defines the left margin of the page. IE
must end with , usually in the end of the file.
Meta tags
The META tag is used to give information to the browser or search engines. It
should be placed within the HEAD tags. The following parameters can be used:
HTTP-EQUIV="refresh" CONTENT="n ; URL=url"
This will reload the page every n:th second. If URL is specified the page will
reload to that page instead of the current. Not all browsers support this
feature.
NAME="keywords" CONTENT="word1, word2..."
This will tell a search engine the search keywords for the page. Used by, in
example, Alta Vista.
NAME="description" CONTENT="text"
A short description of your page, which are used for example by search engines
as AltaVista.
NAME="copyright" CONTENT="text"
A copyright description of the text, for example "© Me 1997".
NAME="distribution" CONTENT=global|local
Defines if the page is an index page (global) or not (local).
NAME="robots" CONTENT="none|nofollow|all|noindex"
A more frequently used way to tell search engines which pages should be
indexed. NOFOLLOW will index the present page only, NOINDEX will linked pages
only, ALL will index both the present and the linked pages and NONE won't index
anything at all.
NAME="text" CONTENT="text"
There are more different META-tags. Some editors use to add their own codes
such like NAME="generator", some people use to have NAME="author", etc. It can
also be a good place to communicate with those people who's reading your HTML
source to see how you've wrote your pages.
Frames
See also "Picture and Objects" for floating frames.
. IE NS
text
Text and pictures within this tag won't show up in browsers that support
frames. Must end with . Put the mainframe's content into this tag,
and link to the other framed pages. IE NS
Defines a frame within the FRAMESET tag. The following parameters can be used:
IE NS
NAME="text"
NAME is the name of the frame, for example used in the TARGET parameteres to
refer to the specified frame.
SRC=url
The url to the page which should be placed within the tag.
[SCROLLING=yes|no|auto]
Defines if the frame should have scrollbars. If auto is used, scrollbars will
be used if they are needed.
[MARGINHEIGHT=n] [MARGINWIDTH=n]
Sets the margins to the frameborder in pixels.
[NORESIZE]
Prevents the user from resizing the frames by draging the border.
[FRAMEBORDER=yes|no] [BORDER=n] [BORDERCOLOR=color] [FRAMESPACING=n]
The same properties as in the FRAMESET tag.
Other tags
Starts and ends the HTML document. A page should start with the tag
followed by the HEAD section and it's content inside the tag. Finally it
should end with .
A tag which usually starts the pages, describing the language in which is
written. If the document contains HTML 2.0 code, DOCTYPE should be . To just define that the content is
HTML, use . DOCTYPE is not
required, and not widely used, but it's no reason to not use it.