HTML Tutor
HTML Tutor
HTML Tutor
NET | C#
HTML
INTRODUCTION TO MARKUP LANGUAGE
INTRODUCTION TO HTML
What is html?
Hyper
You may have heard the expression "hyper" in describing someone. In simplest
terms, it means active, kind of "all over the place". The word "Hyper" as part of
HTML is similar in context. It simply means that when you are on the Internet
using a browser such as Netscape Navigator or Internet Explorer, you can in fact;
go "all over the place". In browsing through the World Wide Web (WWW), if you
see something you like, you can go immediately to it. There is no set order to do
things in. Hyper is the opposite of "linear". Linear means that there is a certain
order you must follow such as "you must do this before you can do that".
Programming languages such as BASIC and FORTRAN are linear. HTML does
not hold to that and allows you to jump to any page on the WWW and at any
time. Thus the word HYPER refers to the idea that the text in HTML is not linear.
Text
We are working with text only files.
Markup
"Markup" comes from the fact that in order to create web pages, we will be typing
in the text and then "marking up" the text.
Language
"Language" means that we are using a language with all its syntax. Note that
HTML is not a programming language such as BASIC or FORTRAN. These are
linear programming languages and are based on a whole different set of rules
and are far more complicated to learn. The HTML language is easy to learn.
History Of HTML
The first working system that used these concepts was the Generalized Markup
Language (GML) developed by Charles Goldfarb, Edward Mosher, and Raymond
Lorie at IBM. This system was the direct predecessor of SGML.
HTML Level 0
HTML was at level 0 in its first implementation in 1990. At that time, the means of
communication over the Internet included email, Ftp (File Transfer Protocol), and
Telnet, all using TCP/IP (Transmission Control Protocol/Internet Protocol).
Berners-Lee & his colleagues used SGML to implement HTML.
HTML 1.0
The original version of HTML was HTML 1.0. It had very limited features, which
greatly limited what you could do in designing your web pages.
HTML allows the assignment of characteristics of text, such as font size, style
and type. It also allows the creation of new structural elements such as objects
and the definition of characteristics of those objects.
• LANGUAGE is COMMON
HTML was meant to be a common language that could be used to tie together
information from widely different sources.
• SIMPLE
HTML was meant to be simple for both HTML authors and programmers to
use.
• PLATFORM INDEPENDENCE
It is popular for its platform independence.
HTML follows the general philosophy of the web, which is to “be conservative in
what is produced and liberal in what is accepted”. This means that the servers try
to maximize the correctness and conformance of the HTML output and the Web
browsers strive to make sense out of what the server sends.
Uniform Resource Locator (URL) is the primary naming scheme, which is used to
identify Web resources that can either be HTML, documents or other services
present in the Web. These Web resources are identified with special names
called Uniform Resource Identifier (URI). The URL is the standard method used
to identify any resource. Mostly it consists of Service, Hostname and Directory
path.
Service:// hostname: port/directory-path
Service indicates the name of the protocol used to access data present on the
other end of the link.
Hostname indicates the domain name for the web server where the web page
resides. In most cases specification of the port address is not required as the
servers themselves have a default port address.
Directory-path specifies the name of the HTML file.
The World Wide Web is a vast amorphous blob of text, images, audio and video
scattered across networks and computers worldwide. Hence the name World
Wide Web has came. It is shortly referred to as “Web” or “W3”. It is a software
invention, which aids users to explore the Internet facility. World Wide Web is a
part of the Internet comprising of Web pages and Web sites.
Web is a collection of files known as Web pages. These Web pages can contain
hyperlinks to link other Web pages. A hyperlink can be any text or image which
when clicked would display another web page. There may be one or more pages
in the Home page, which is the initial Web page present in a Web site.
Browsers
A Web browser is a special type of parsing engine that evaluates the tags and
content of an HTML file and displays it according to the capabilities and rules of
the file’s own capabilities and platform. For example-a text-only browser displays
the alternative text for an image, but a graphical browser displays the actual
image. The major browser used to surf the Internet is, Microsoft Internet Explorer
and another browser, which is the product of Sun Micro system is Netscape
Navigator.
Hardware Requirement
MINIMUM PREFERRED
Software Requirement
1. 1. Do your work in a text editor such as NOTEPAD (typing in all the text
and tags)
2. 2. Save your work in an HTML file using any appropriate name
3. 3. Load the HTML file into the browser to see how your web page looks
and works
4. 4. Switch back to NOTEPAD to make any corrections, changes, etc.
Once you have saved your HTML file or document, you need to SWITCH over to
your browser, which is running in the background. Once you activate your
browser, choose File from the menu bar, and then choose Open ... or Open File
... or Open File in Browser ... (one of them should be in the File menu). You will
then need to locate your file, click on the file name and then click the Okay
button. Your HTML file will appear in the browser. You can only observe your file
in the browser - you cannot edit in the browser. Once you have seen how your
HTML file looks in the browser, you can then SWITCH back to NOTEPAD to
continue working and editing.
Note:
(1) (1) If you want to LOAD a new HTML file into NOTEPAD, and the name
does not show up in the correct directory in the dialog window, choose to
show All Files (*.*) in the Files of type line and the name should then
appear. Click on the name and then on the Open button.
(2) (2) If you use a word processor other than NOTEPAD, you may first need to
CLOSE the HTML file before it can be loaded into your browser. With
NOTEPAD this is not necessary.
HTML ELEMENTS
HTML comprises of three major elements that render a well-structured look for a
document.
• • Head
• • Body
• • Footer
HTML tags
HTML works in a very straightforward manner. You type in your text and your
tags. To get large print, centered text, bold text, text in italics, indented
sentences, colored text, etc., is nothing more than inserting tags around your
text. These tags are more accurately called ELEMENTS and you should think of
these elements as describing the meaning of the text they contain, rather than
how the enclosed text should be displayed. This concept is called content-
based markup, as opposed to presentational markup. Because we don't want
the tags (elements) to appear in the browser, we need a way to tell the browser
that something is a tag - and this is easy to do. To tell the browser that something
is a tag, you simply place "less than" and "greater than" symbols around them.
The LESS THAN symbol is "<" and the GREATER THAN symbol is ">". These
symbols are also called "Angle Brackets". Thus we have an opening angle
bracket "<" and a closing angle bracket ">" around each tag.
Correct use of tags
We have "beginning" or "opening" tags (such as <HTML>) and we have "ending"
or "closing" tags (such as </HTML>). Many elements consist of an opening tag
and a closing tag. An element that has an opening and closing tag is referred to
as a container element because anything contained between these tags are
affected by the element.
Closing Tags cannot be placed just anywhere. Use the "Last In = First Out"
principle or "LIFO". That is, the "Last" tag "In" must be the "First" tag "Out".
Another way of stating this is that the last tag activated must be the first tag
terminated? An example of a correct sequence of tags is:
<tag1><tag2> statements </tag2></tag1>
In this example, <tag1> is activated first, and then <tag2>. Thus <tag2> must be
terminated first with </tag2> followed by the termination of <tag1> (</tag1>). In
other words, tags are closed in reverse order to the way they are opened. Thus
the first tag opened must be the last tag closed.
An example of an incorrect placement of tags is:
<tag1><tag2> statements </tag1></tag2>
In this example, the last tag opened (<tag2>) is not the first tag closed. That is,
these tags overlap. </tag2> must come before </tag1>. Therefore this example
does not satisfy the LIFO principle. Container tags cannot overlap each other. If
you do not place tags properly, your web page simply won't work.
The following is another example of a correct use of tags:
<tagA><tagC><tagB><tagD>statements </tagD></tagB></tagC></tagA>
A markup tag is defined by the markup element and an optional set of attributes.
Tags are divided into two groups, non-empty and empty. There are mainly two
types of tags in HTML.
i) Empty tag
The tags, which are not required to close (i.e. starting tag will be there but
closing tag is not there) are called empty tag. Example: <BR>, <IMG>. As
<BR> is an empty tag, that’s why </BR> is not required. It is similar for
<IMG> also.
There is one special tag <P>, which can be said as an empty tag or non-empty
tag. Sometimes it can be used with only starting tag i.e. <P> or sometimes it may
be used with ending tag also (normally for formatting a paragraph), i.e. <P> …
</P>.
Basic tags
TAG DESCRIPTION
<HTML>…</HTML> Indicates the beginning of HTML
document
<HEAD>…</HEAD> Indicates the beginning of document
header
<BODY>…</BODY> Indicates the beginning of document
text
<TITLE>…</TITLE> Indicates title for the web page
One of the statements that must included between the <HEAD> and </HEAD>
tags is the TITLE of your web pages. The title in our example is " THIS IS OUR
FIRST DOCUMENT". Notice that this title is placed by the browser at the very top
of the screen - above the menu choices. In Netscape it reads:
Netscape- [THIS IS OUR FIRST DOCUMENT]
Thus Netscape has added its name to the title. The TITLE of your website or of
your web page must occur between the <TITLE> and </TITLE> tags and you are
only allowed one TITLE element per page. The information you provide in the title
is also used to label the bookmark entry for your web page and is also a caption
in search engine results. Therefore you should take time to make up a good
descriptive title for each of your web pages. You will notice that each of our
lessons has its own title that describes in general the content of the lesson.
Because we do not want the title to be displayed on the browser screen, the
<TITLE> and </TITLE> tags must be placed between the <HEAD> and </HEAD>
tags.
<META> tag
This tag specifies information about the document to browsers, applications and
search engines. With <meta> tag, we can instruct the browser to load a new
document after the specified time (client-pull) or you can specify key-words for
search engines to associate with your document.
Attributes
• • Content
Assigns values to the HTTP header fields when using REFRESH
HTTP header, assign a number along with a URL to the content
attribute, the browser then loads the specified URL after the specified
number of seconds.
• • HTTP-EQUIV
This attribute indicates the HTTP header value you want to define,
such as REFRESH, EXPIRES or CONTENT LANGUAGE.
• • Name
This attribute specifies the name of the association you are defining,
such as, keywords or description.
Attributes
Background =file
Bgcolor=”#RRGGBB”
Text =”blue”
Link=”red”
Vlink=”blue”
Alink=”black”
Topmargin=”70%”
Leftmargin =”60%”
Example
<HTML>
<HEAD><TITLE>THIS IS OUR FIRST DOCUMENT</TITLE> </HEAD>
<BODY background=”image.gif” bgcolor=”#624840” text=”red”
link=”green” alink=”magenta” vlink=”blue”>
FIRST HTML DOCUMENT
</BODY>
</HTML>
• • Background
Specifies as an image to be used to tile on the document background. Do not
use with BGCOLOR.
• • Bgcolor
Specifies a solid color to be used for the document background.
• • Text
Specifies the text color. Text is black by default.
• • Link
Specifies the hypertext link color. The default color for the hypertext link color is
light blue.
• • Alink
Specifies the “activated” hypertext link color. The default is red. The link changes
to this color when the mouse button clicks on the link and before the mouse
button is released.
• • Vlink
Specifies the “visited“ hypertext link color. The default is dark purple. This is the
color that indicates that the link has been previously visited.
• • Topmargin
Specifies the top margin of the displayed area in the browser below which the
text will be displayed.
• • Leftmargin
Specifies the left margin of the displayed area in the browser from the right of
which the text will be displayed.
Formatting tags
Use the paragraph tag to mark the beginning of a new paragraph; the ending tag,
</P>, is optional. You could include the ALIGN attribute to specify whether the
paragraph should be centered or right aligned in the page (left-aligned is the
default).
<BR> tag
It tells the browser to wrap the text that follows onto a new line without inserting
any extra space between the lines.
<PRE>..</PRE> tags
This tag is effective for formatting program code or similar information. Usually
appears in a fixed-width font with ample space between words and lines.
<BLOCKQUOTE>..</BLOCKQUOTE> tags
The BLOCKQUOTE element marks up quotes that take more than a few lines.
You use this tag when you are quoting one or more paragraphs from another
source. In HTML 4.0 the <BLOCKQUOTE> tag can take an optional CITE
attribute to indicate where the quote came from.
It is written like this-
<BLOCKQUOTE CITE=http://www.levity.com/brooklyn/index.html>…
</BLOCKQUOTE>
<HR> and attributes
Helps to position the text in an equal distance between the left and right edges
of the document which is given within the starting <CENTER> tag and ending
</CENTER> tag.
• • ALIGN
Positions the heading in the left, right or center of a document.
<H3 align=”right”>
• • CLASS
Indicates which style class applies to the <Hn> element.
• • ID
Assigns a unique ID selector to an instance of the <Hn> tag. When you then
assign a style to that ID selector, it affects only that one instance of the <Hn> tag.
• • STYLE
Specifies style sheet commands that apply to the heading.
<H1 STYLE=”background: red”>
• • TITLE
Specifies text assigned to that tag.
<H1 TITLE=”Headline”>
Example:
<HTML>
<HEAD><TITLE>DOCUMENT</TITLE></HEAD>
<BODY>
<STRONG>HELLO!!</STRONG><BR>
<B>
<U><I>HEADINGS WILL BE: </I></U>
</B>
<BR>
<H1 >THIS IS H1</H1>
<H2 > THIS IS H2</H2>
<H3> THIS IS H3</H3>
<H4 > THIS IS H4</H4>
<H5> THIS IS H5</H5>
<H6> THIS IS H6</H6>
<P> THESE ARE ALL ABOUT HEADINGS
<BR>
<P> Now come to the next part of HTML
<BR>
<EM>DETAILS</EM>
<ADDRESS> Winserv Technology
<BR>center: A.J.C Bose Road
</ADDRESS>
<BLOCKQUOTE>
<p>Omit needless words</p>
<p>Vigorous writing is concise. A sentence should contain no
unnecessary words, a paragraph should contain no unnecessary
sentences, for the same reason that a drawing should have no
unnecessary lines & a machine should not have any unnecessary parts.
</p>-William Sturunk </ BLOCKQUOTE >
<PRE>A guide to HTML</PRE>
</BODY>
</HTML>
Output:
<BASE> tag
A <BASE> tag tells the browser the correct absolute URL of the document, which
might fix the relative URLs used on that page.
<BASE>…</BASE>
<BUTTON> tag
Sets up a button to submit or reset a form as well as to activate a script. Use the
<IMG> tag between the opening and closing <BUTTON> tag to specify a
graphical button.
<BUTTON TYPE=”BUTTON” VALUE=”Run program” onClick=doit> Click
it </BUTTON>
• • CLASS
Indicates which style class applies to the <BUTTON> element.
• • DISABLED
Denies access to the input method. Not applicable for Netscape.
<BUTTON TYPE=”SUBMIT” NAME=”PASS” DISABLED>
• • ID
Assigns a unique ID selector to an instance of the <INPUT > tag.
• • VALUE
Sets the default value for the button face.
• • TYPE
Indicates the kind of button to create.
• • NAME
Gives a name to the value you pass to the form processor.
• • STYLE
Specifies style sheet commands that apply to the element.
• • TITLE
Specifies text assigned to the tag.
• • TABINDEX
Specifies where the input method appears in the tab order.
<BUTTON type=”button” class=casual value=”Click To Run” title=”ABC”
style=”background: red” tabindex=3 name=”run prog” disabled>
Special tags
1. <MARQUEE>………….</MARQUEE> tags
Marquee attributes
• • Behavior=Slide/Flash/Alternate/Scroll
• Direction=Right/Left (Default)
• Height=30%
• Width=200
• Loop=-1 (-1 represents infinite looping)
2. <BLINK>…</BLINK> tags
3. <DIV>…</DIV> tags
The W3C (WORLD WIDE WEB CONSORTIUM) has been trying to standardize
HTML tags so they all match a similar pattern. One of the great frustrations was
Netscape’s introduction of the <CENTER> tag, which had no <LEFT> or
<RIGHT> alignment equivalents. To standardize this tag, the W3C supplied the
<DIV> tag, which separates documents into separate divisions for formatting
purposes. So, a web page can be divided into segments or division called DIVs.
Each segment starts with <DIV> and ends with </DIV>. These segments can be
positioned anywhere on the page. The <DIV> tag has a position attribute that can
take one of the two values, Absolute and relative.
Absolute positions the segment with respect to the top/left edge of the browser
window. In contrast with Absolute, Relative positions the segment in relation to
other elements on the page.
<DIV ALIGN=”center”>
HTML code to align to center, including headings, text. tables and images.
</DIV>
<FONT> tag
This tag helps to alter or set font characteristics of the font the browsers uses to
display text.
Syntax:
<Font attributes>content to be displayed</font>
Attributes
• • Face
Specifies a comma-separated list of font names the browser uses to render text.
If the browser does not have access to the first named font, it tries the second,
then the third and so forth.
• • Color
Indicates the color the browser uses to display text. Color names can substitute
for the RGB hexadecimal values.
• • Size
Specifies the size of the text affected by the FONT tag. You can specify the size
relative to the base font size (see the <BASEFONT> tag), which is normally 3.
You can also specify the size as a digit in the range 1 through 7.
Example:
<BASEFONT size=4>
<FONT size=+2 face=”Avant Guard”> THIS IS A FONT OF SIZE 6. </FONT>
<FONT size=1 color=#FF0000> THIS IS A FONT OF SIZE 1. </FONT>
Provides a font setting for normal text within a document. Font settings within the
document are relative to settings specified with this tag. Use this tag in the
document header (between the <HEAD> tag).
<BASEFONT SIZE=3>
LINKING
There are two major categories of links: external links which are links to files not
on your own site (created by someone else) and internal links, which are links
to files that are part of your site (created by you).
With HTML tags we can create links both internal and external.
<A>…</A> ‘A’ stands for Anchor.
• • Href
HREF indicates Hyperlink REFerence. The HREF attribute must point to a URL
and the URL should appear in quotes, like this:
<A HREF=http://www.construct.net/> Construct </A>
• • Title
One anchor attribute that provides more information about a link is the TITLE
attribute. The TITLE attribute allows an “advisory title” that explains the resource
in more detail.
<P> we are learning LINKING <A HREF=http://www.abc.com/ TITLE=”abc”> in
details </A>
Browsers may choose different methods of showing the advisory TITLE attribute,
such as displaying the title in a tool tip or balloon help, or the title might appear
on the status bar. Currently the only popular browser that makes use of the
TITLE attribute in a link is Internet Explorer 4, which displays it as a tool tip.
Navigator should soon support these attributes.
• Name (‘text’)
• • Target
The TARGET attribute is normally used with frames. However, you can use the
TARGET attribute even if you don’t use frames. When you specify a TARGET for
your links, you indicate the name of a window where you’d like the linked page to
appear.
A link can be specified like this:
<A HREF=http://www.abc.com/~PC/ TARGET =”window2”> XYZ </A>
When this link is followed, a new window (named internally “window2”) is
created, containing the XYZ page.
• • Rel
This attribute and its value indicate the relationship of the current document to
the document referenced in HREF. Possible values include Contents, Index,
Glossary, Copyright, Next, Previous, Style Sheet, Bookmark and Help.
<LINK rel=Glossary href=”glossary.html”>.
This attribute is also used to specify linked style sheets. Another possible value is
Alternate, which indicates an alternate version of the document.
• Rev
Example:
<Html>
<Body bgcolor=pink>
<A href="sec.htm"><b>This is Winserv Technology. </b></A>
<BR><BR><BR>
Output:
List
HTML has special sets of tags just for displaying lists with a host of special
attributes to give you greater control over their appearance. Lists are a great way
to provide information in a structured, easy-to-read format. A list is a good form
for a procedure. At the most basic level, lists are divided into two categories.
• Ordered lists
These lists are typically used to indicate a sequence of events or priorities. They
are also used to specifically identify sections and relationships when creating
outlines.
• Unordered lists
These lists are typically used to display a group of items that are somehow
related, but necessarily in a hierarchical fashion.
Ordered lists have additional attributes that you can use to specify the first
number in the list, as well as to create hierarchical information. The name of that
attribute is VALUE.
Finally, one special list variant, definition lists, can be useful for providing two
levels of information. <DL> is used to create a glossary-style listing, which is
handy for items such as dictionary listings and Frequently Asked Questions
pages. The <DL> tag is used similarly to the unordered list tag, except that it
doesn’t use the <LI> tag to mark its entries because a definition list requires two
items for every entry, a term and its definition. Marking these two items is done
with the corresponding <DT> and <DD> tags.
<DL>
<DT>Term1<DD>Definition 1
<DT>Term 2<DD>Definition 2
…
….
……..
…………
………..
<DT>Term n<DD>Definition n
</DL>
In this tag, Term is the word requiring a definition, and Definition is the block of
text that supplies the definition.
Example:
<html>
<head><title>two shopping lists</title></head>
<body bgcolor=cyan>
<ul>
<li>EGGS
<li>MILK
<li>APPLES
<li>RAZOR BLADES
</ul>
<ul type="square">
<li> HAMMER
<li>SCREWDRIVER
<li type="disc">SCREWS
<li type="circle">CHAINSAW
</ul>
<ul>
<li>A
<ul>
<li>AA
<li>AB
<ul>
<li>AAA
<li>ABA
</ul>
<li>AC
</ul>
</ul>
<ol>
<li>BREAD
<li>TURKEY BACON
<li value="10">DARKCHOCOLATE
<li>AVOCADOS
</ol>
<DL>
<DT>Term A
<DD>Definition of term A
<DT>Term B
<DD>Definition of term B
</DL>
</body>
</html>
Output:
Placing images on web page
You can include images (pictures or other nontext objects) in any Web page to
provide information or to make the page more attractive. An image that you
include in a Web page is called an inline image, as opposed to an image that is
viewed separately in your browser, such as when the image file is the target of a
link.
• Alternate Text
When a browser cannot display graphic images, perhaps because the image file
cannot be found or because the browser’s image-loading capabilities have been
turned off to save download time, you can include the ALT attribute in an image
tag to have text displayed in place of the image.
• Sizing
By default, your browser loads an image from the top down and displays the
image in as large a box as needed. You can specify an exact size for the image
by including the WIDTH and HEIGHT attributes within the HTML tag.
• Aligning
You can use the ALIGN attribute with the LEFT, CENTER, or RIGHT options to
position the image either left, centered, or right in the browser window. You can
also use the TOP, BOTTOM, or MIDDLE attributes to align text with the top,
bottom, or middle of the image.
Other attributes:
Border=n
Ismap
Usemap
Alt (“text”) specifies the text, which would be displayed, if the
browser does not support graphics.
• Src
“URI” specifies the location of the image to load into the document.
• Align
“top | middle | bottom | left | right” Aligns the object with respect to context.
• Width
“length” sets the display width of the image.
• Height
“length” sets the display height of the image.
• Vspace
“pixels” sets the amount of space to be inserted to the top and bottom of the
element.
• Hspace
“pixels” sets the amount of space to be inserted to the left and right of the
element.
• Border
sets the border width of the image.
• Ismap
used to define a server-side image map.
• Usemap
“URI” Associates an image map as defined by the MAP element with this image.
• • Alt
“TEXT” Alternate text to be displayed if the user agent cannot render the
element.
Image as a link
The map element (<MAP> and </MAP>) is used for imagemaps. An imagemap
is an image that contains hotspots can take a surfer to different URLs. So an
imagemap is simply an image that can be used to take a surfer to different
places, depending on where they click in the image. So, an imagemap is an
extended version of hyperlink. Instead of having an image represent only one
link, the image can represent several different links depending on where in the
image you click.
Example:
<MAP name=”sportsmap”>
<AREA shape=”circle” cords=”65,129,57”
href=http://www.sportgoods.com/baseball.html>
<AREA shape=”rect” cords=”165,157,200,120”
href=http://www.sportgoods.com/golf.html>
<AREA shape=”default” href=http://www.sportgoods.com/index.html>
</MAP>
<MAP> elements are contained within the body of the document and have only
one attribute name. The name attribute identifies the particular MAP element
referenced with the usemap attribute. The AREA element is used within the
MAP to delineate a hyperlink and the shape and coordinates of its corresponding
hot spot in the image.
The usemap attribute tells the browser that it’s dealing with an imagemap and
then directs the browser to where coordinate and the URL information for this
imagemap can be found.
HTML’S SPECIAL CHARACTER CODE
Color Code
Black “Black” or “#000000”
Green “Green” or “#008000”
Silver “Silver” or “#C0C0C0”
Lime “Lime” or “#00FF00”
Gray “Gray” or “#808080”
Olive “Olive” or “#808000”
White “White” or “#FFFFFF”
Yellow “Yellow” or “#FFFF00”
Maroon “Maroon” or “#800000”
Navy “Navy” or “#000080”
Red “Red” or “FF0000”
Blue “Blue” or “#0000FF”
Purple “Purple” or “#800080”
Aqua “Aqua” or “#00FFFF”
Cyan “Cyan” or “#00FFFF”
Sea green “#2E8B57”
Violet “#EE82EE”
Khaki “#F0E68C”
Brown “#A52A2A”
Orange “#FFA500”
Pink “#FFC0CB”
Gold “#FFD700”
Ivory “#FFFFF0”
Tomato “#FF6347”
WORKING WITH TABLE
The table as the name indicates aligns contents in a row and column format .The
table can contain any kind of data, i.e. it can include links, paragraphs, all header
levels, another table, preformatted text, images and so on.
Attributes
<TABLE> tag
Attributes Description
Border=n Indicates border for the table.
Bordercolor=”#RRGGBB” or “..” Specifies the color of the
border of all the table cells
Bordercolordark=”#RRGGBB” or Specifies the darker color used
“..” to draw 3-D borders around the
table cells
Bordercolorlight=”#RRGGBB” or Specifies the lighter color used
“..” to draw 3-D borders around the
table cells
Cellpadding=n Indicates space between
border & contents of cell
Cellspacing=n Indicates spacing between cells
Align=LEFT/CENTER/RIGHT Positions the table according to
the alignment value in the
window
Background=URL Specifies the absolute or
relative location of a graphic
image file loaded as a
background image for the
entire table
Bgcolor=”#RRGGBB” or “..” Specifies the background color
within all table cells
Class=”…” Indicates which style class
applies to the <Table> element.
Cols=n Specifies the no. Of columns in
the table
Width=n Indicates width of the table
<CAPTION> tag
Align----top/bottom/left/right
<THEAD> tag
Defines a table header section. At least one table row must go within <THEAD>.
Attributes Description
Title=” …” Specifies text
assigned to the tag
VAlign=TOP/MIDDLE/BOTTOM/ Aligns the contents
BASELINE of table header with
respect to the top
and bottom edges of
the header
container.
Align=LEFT/RIGHT/CENTER/JUSTIFY/CHAR Specifies how text
within the table
header will line up
with the edges of
the table cells
Class=”…” Indicates which
style class applies
to the <TH>
element.
<TH> tag
ATTRIBUTES DESCRIPTION
<TR> tag
Contains a row of cells in a table. You must place the <TR> tags inside the
<TABLE> container, which can contain <TH> and <TD> tags.
ATTRIBUTES DESCRIPTION
cells
Bgcolor=”#RRGGBB” or “..” Specifies the
background color of
the table cells in the
row.
Class=”…” Indicates which style
class applies to the
<TR> element.
Nowrap Indicates that text
within table cells in
the row not wrap.
VAlign=TOP/MIDDLE/BOTTOM/ Specifies the vertical
BASELINE alignment of the
contents of the cells
within the row.
<TD> tag
This tag is the data cell tag, used for the body of the table.
ATTRIBUTES DESCRIPTION
<TBODY> tag
Defines the table body within a table. This tag must follow <TFOOT> tag.
ATTRIBUTES DESCRIPTION
<TFOOT> tag
Defines table footer within a table. It must precede the <TBODY> tag.
ATTRIBUTES DESCRIPTION
Example1:
<html>
<head>
<title>glossary</title>
</head>
<body bgcolor=pink>
<center>
<font color="white">
<table border=4 background="clouds.jpg" width=75%
bordercolorlight="blue" cellpading=7 cellspacing=10 >
<caption><b>DETAILS OF BOOKS</b></caption>
<thead align=CENTER>
<td><b>TITLE</b></td><td><b>AUTHOR</b></td>
</thead>
<tr align=CENTER>
<td>HTML</td><td>BPB publication</td>
</tr>
<tr align=CENTER>
<td>JAVA</td>
<td>PATRIC</td>
</tr>
<tr align=CENTER>
<td>LET US C</td>
<td>BPB Publication</td>
</tr>
</table>
</font></body>
</html>
Output:
Example2:
<html>
<head>
<title>example of attributes</title>
</head>
<body bgcolor=cyan>
<center>
<table border=6 bgcolor=white width=75%>
<caption>example of rowspan</caption>
<tr align=CENTER>
<td rowspan=2>CELL 1,1</td>
<td >CELL 1,2</td> </tr>
<tr align=CENTER>
<td>CELL 2,2</td> </tr>
<tr align=CENTER>
<td>CELL 3,1</td>
<td>CELL 3,2</td>
</tr></table>
<table border=6 bgcolor=white width=75%>
<caption>example of colspan</caption>
<tr align=CENTER>
<td colspan=2>CELL 1,1</td>
<td >CELL 1,2</td> </tr>
<tr align=CENTER>
<td>CELL 2,1</td>
<td>CELL 2,2</td>
<td>CELL 2,3</td>
</tr><tr align=CENTER>
<td>CELL 3,1</td>
<td>CELL 3,2</td>
<td>CELL 3,3</td>
</tr></table>
</body>
</html>
Output:
ATTRIBUTES DESCRIPTION
Title Specifies text assigned to the tag
Name Specifies the name of the form
Action=FILE/URL Specifies the location where FORM data
is passed
Method=GET/POST Specifies the method by which the data
is sent to the server.
ATTRIBUTES DESCRIPTION
NAME Uniquely identifies <Select> tag
SIZE Specifies the number of items visible at a
time.
MULTIPLE Allows multiple items to be selected
ATTRIBUTES DESCRIPTION
SELECTED Specifies the default item among the list
VALUE Provides the content associated with the
NAME=attribute
ATTRIBUTES DESCRIPTION
NAME Specifies the name of the TEXTAREA
ROWS Specifies the number of rows
COLS Specifies the number of cols
<FIELDSET>…. </FIELDSET> TAG: Groups related form elements
ATTRIBUTES DESCRIPTION
TITLE Specifies text assigned to the tag.
<LEGEND>…. </LEGEND> TAG: Assigns a caption to a FIELDSET.
ATTRIBUTES DESCRIPTION
ALIGN Indicates whether the legend appears at
the top, bottom, left, or right of the
fieldset.
TITLE Specifies text assigned to the tag.
Example:
Formex.htm
<html>
<head>
<title>FORM EXAMPLE</title>
</head>
<body bgcolor=lightcyan>
<Form method="POST">
<B><p align="center">
<Font color="#800000">
<i><b>EXAMPLE OF FORM</b></i>
</font> </p>
<p align="left">
<font color="#800080">NAME</font>
&nb
sp;
<input type="text" name="T1" size="20" maxlength="30">
</p>
<p align="left">
<font color="#800080">PASSWORD
&nb
sp;
:
<input type="password" name="T3" size="20">
</font>
</p>
<p align="left">
<font color="#800080">ADDRESS
&nb
sp;
:
<textarea rows="2" name="S1" cols="20"></textarea>
</font>
</p>
<p align="left">
<font color="#800080">PHONE
&nb
sp;
<input type="text" name="T2" size="8" maxlength="16">
</font>
</p>
<p align="left">
<font color="#800080">SEX :
&nb
sp;
MALE <input type="radio" value="V1" checked name="R1">
FEMALE <input type="radio" name="R1" value="V2">
</font>
</p>
<p align="left">
<font color="#800080">EDUCATIONAL QUALIFICATION
:
<select size="1" name="D1">
<option>UNDER GRADUATE</option>
<option selected>GRADUATE</option>
<option>POST GRADUATE</option>
<option>B.E.</option>
</select>
</font>
</p>
<p align="left">
<font color="#800080">HOBBIES
&nb
sp;
LISTENING MUSIC <input type="checkbox" name="C1" value="ON"
checked>
</font></p>
<p align="left"> <font color="#800080">
&nb
sp;
READING STORY BOOKS <input type="checkbox"
name="C2" value="ON">
</font> </p>
<p align="left">
<font color="#800080">
PLAYING <input type="checkbox"
name="C3" value="ON">
</font> </p>
<p align="left"><font color="#800080">
&nb
sp;
WATCHING MOVIES <input type="checkbox" name="C4"
value="ON">
</font></p>
<p align="center">
<input type="submit" value="Submit" name="B1">
<input type="reset" value="Reset" name="B2"></p>
<p align="left"> </p>
</form>
</body>
</html>
Output:
FRAME
A frames page is a special kind of HTML page that divides the browser window
into different areas called frames, each of which can display a different page.
When you click a hyperlink on a page displayed in one frame, the page pointed
to by that hyperlink can be displayed in another frame.
The frames page itself contains no visible content: It's just a container that
specifies which other pages to display and how to display them.
When you create a frames page using one of the frames page templates, the
navigation between frames is already set up for you. In the Contents frames
page template, for example, clicking a hyperlink in the Contents frame on the left
displays a page in the Main frame (called the target frame) on the right.
Frames allow a single Web browser window to be divided into several different
areas. Each area can display a different Web page. Thus frames add flexibility to
a site. To define frame, first define a page that gives the frame layout. Second,
specify a web page put in each frame. A page that gives a frame layout does not
have <BODY>; instead, <FRAMESET> tag, you break the window into columns
or rows. Each column or row then may be used as frame, or broken up into
smaller frames by using another <FRAMESET> tag. Like <BODY> the
<FRAMESET> container must end with </FRAMESET> tag.
On frames pages that you create using frames page templates (suppose in
FrontPage), the navigation between frames is already set up for you. In the
Contents template, for example, any hyperlinks you create on the page in the
Contents frame automatically display a page in the Mainframe.
Example:
FARMEEX.HTM
<HTML>
<HEAD><TITLE>frame example</TITLE></HEAD>
<FRAMESET cols="20%, 80%">
<FRAME scrolling="yes" src="first.htm">
<FRAMESET rows="35%, 65%">
<FRAME scrolling="yes"
src="third.htm">
<FRAME scrolling="yes" src="sec.htm">
</ FRAMESET>
</ FRAMESET>
</Html>
FIRST.HTM
<HTML>
<HEAD><TITLE>THIS IS OUR FIRST DOCUMENT</TITLE>
<base target="rtop"></HEAD>
<BODY>FIRST HTML DOCUMENT</BODY>
</HTML>
SEC.HTM
<HTML>
<HEAD><TITLE>two shopping lists</TITLE>
<base target="rbottom"></HEAD>
<BODY bgcolor=cyan>
<ul>
<li>EGGS
<li>MILK
<li>APPLES
<li>RAZOR BLADES
</ul>
<img src="earth.gif" height=120 width=150 vspace=20 hspace=50>
<ul type="square">
<li> HAMMER
<li>SCREWDRIVER
<li type="disc">SCREWS
<li type="circle">CHAINSAW
</ul><ul>
<li>A
<ul>
<li>AA
<li>AB
<ul>
<li>AAA
<li>ABA
</ul>
<li>AC
</ul>
</ul>
<ol>
<li>BREAD
<li>TURKEY BACON
<li value="10">DARKCHOCOLATE
<li>AVOCADOS
</ol>
<DL>
<DT>Term A<DD>Definition of term A
<DT>Term B<DD>Definition of term B
</DL>
</BODY>
</HTML>
THIRD.HTM
<HTML>
<HEAD>
<TITLE>DOCUMENT</TITLE>
</HEAD>
<BODY>
<STRONG>HELLO!!!!!!!</STRONG>
<B><U><I>
HEADINGS WILL BE:
</I></U></B>
<BR>
<H1 align="center">FIRST LEVEL HEADING</H1>
<H2 >SECOND LEVEL HEADING</H2>
<H3>THIRD LEVEL HEADING</H3>
</BODY>
</HTML>
Output :
Floating Frame
Floating frames are scrollable areas that appear in a file on a web page. Unlike
regular frames, they cannot be resized. You can place a floating frame anywhere;
you can place an image or other element on an ordinary web page.
• Src
”URI” specifies the URI containing the initial contents of the frame.
• Name
names the current frame.
• Frameborder
”1 | 0” Toggles borders to be drawn around the frame.
1 represents a border is drawn.
0 represents a border is not drawn.
• Marginwidth
”pixels” Sets the margin between the contents of the frame and its left and right
borders.
• Noresize
Prohibits the user agent from resizing the frame.
• Scrolling
”auto | yes |no” determines whether the user agent provides scrolling devices for
the frame.
Example:
<HTML>
<head>
<title>example of inline frame</title>
</head>
<body bgcolor="pink" text="blue">
<p>
DIFFERENT FILES
<center>
<IFRAME src="first.htm" marginheight="0" frameborder="10" width="300"
height="100">
<P>
The <A href="first.htm">first</A> first file is available.
</IFRAME>
<P>
The <A href="sec.htm">sec</A>second file is available.
</IFRAME>
<P>
The <A href="third.htm">third</A>third file is available.
</IFRAME>
</center>
</body>
</HTML>
Output:
STYLE SHEET
A style is a set of formatting instructions for any given HTML element specified by
the W3C. Many webmasters are already using styles in their web pages because
of their usefulness. For example, the heading <H> tags represent various styles:
Heading level one is bold, times new roman, and 24 points by default; Heading
level four is bold, times roman, and 12 points by default; Using style sheet
features, you can change these default attributes. You can also control margins,
line spacing, and placement of design elements, as well as specify colors, fonts,
and point sizes.
There are three ways you can use style sheets on pages in your web:
• Link a page to an external style sheet.
• Create an embedded style sheet on a page.
• Apply inline styles to individual page elements.
Use an external style sheet when you want to apply the same styles consistently
across some or all pages in your web. By defining styles in one or more external
style sheets and linking them to pages, you ensure consistency of appearance
throughout those pages. If you decide to change a style, you need only make
one change — in the external style sheet — and the change will be reflected in
all of the pages linked to that style sheet. Typically, an external style sheet uses
the .css file name extension, such as Mystyles.css.
Use an embedded style sheet when you want to define styles only for the current
page. An embedded style sheet is a type of cascading style sheet that's
"embedded" within the <HEAD> tags of a page. Styles in an embedded style
sheet can be used only on that same page.
Use inline styles to apply cascading style sheet properties to individual elements
on a page.
If a page is linked to an external style sheet, the embedded or inline styles that
you create for that page will either extend or override properties specified in the
external style sheet.
Note: Linked and inline style sheets are ignored by non-style sheet capable
browsers.
Cascading style sheets refers to the use of multiple, overlapping style definitions
in a single document. A style sheet file can link to every document in a web site,
thus controlling the overall look and feel of the site. The HTML 3.2
recommendation for Cascading Style Sheets specifies four ways to apply style
variations. The first two methods provide ways to reference external style sheets
(text files with .css extensions), which allow you to use styles across multiple web
pages.
The third method defines styles for a single page. The fourth method is used to
make quick temporary style changes to existing HTML text, such as spanning a
background color or an image behind words.
Cascading style sheets give you more control over the appearance and
presentation of your pages. Using cascading style sheets, you can extend the
ability to precisely specify the location and appearance of elements on a page
and create special effects. You can also make your site more accessible for
visitors with specialized browsers or output devices.
A cascading style sheet (CSS) defines the styles that you can apply to pages or
page elements. Each style definition, or style rule, consists of a selector followed
by the properties and values for that selector. The following are simple examples
of style rules defined in a style sheet:
In the example, H1 and H2 are selectors that modify the formatting properties of
standard HTML tags. The selectors' properties and values are contained within
the curly braces { } — font-size is a property, and x-large is the value of the font-
size property. You can specify multiple properties for a selector by separating
each with a semi-colon (;). In this example. note is a class selector, and #footer is
an ID selector.
Using cascading style sheets, you can set a wider range of properties than using
standard HTML alone, including:
In the CSS code below, FONT is known as the sector and color: blue or anything
else that goes within the brackets is known as the declaration. Every HTML tag
that fits under the specifications of the sector are given the declarations listed. In
this case, any FONT tag in the document is given the color blue.
Sty.css
BODY {BACKGROUND: cyan}
H2 {TEXT-ALIGN: "center"; COLOR: "RED"}
P {TEXT-INDENT: "+20%”}
Cas.htm
<HTML><HEAD><TITLE>Sample Example</TITLE>
<LINK REL=Style Sheet HREF="sty.css" type="text/css">
</HEAD><BODY>
<H2>This heading has been created for external style sheet</H2>
<P> CASCADING STYLE SHEET.</P>
</BODY>
</HTML>
Output:
IMPORTANT ATTRIBUTES USED IN STYLE SHEETS
With the explosion of interest in the Internet that is in the World Wide Web HTML
has assumed a prominent place in the computer world. HTML has evolved to
meet the increasing demand for attractive web sites. But the end products, static
web pages that often required repeated time-consuming round trips between
client and server machines, clearly showed that a new direction is in order.
DYNAMIC HTML is that new direction.
What is DHTML?
Use of DHTML
You can create special effects that are displayed when a site visitor enters or
leaves your site, or browses to or from a specific page. By applying transition
effects consistently and judiciously throughout your web, you can create slide-
show-style presentations with professional-looking transitions between pages.
Such as
• When you point to this paragraph, the font changes to bold.
• When you click this paragraph, a border and shading are added to it.
DHTML combines HTML with cascading style sheets (CSS) and scripting
languages. So, actually what it does?
• HTML specifies a Web page’s elements, like a form, table, heading,
paragraph, or a bulleted list.
• CSS enables you to decide how a Web browser renders those elements:
so CSS can be used to determine an element’s color, position, size etc.
• Scripting languages enables you to manipulate the web page’s elements.
<SCRIPT Language=”VBScript”>
<! ---
---
</SCRIPT>
The core of DHTML object model is its object hierarchy. The object hierarchy is
where all the objects that you will need to access and modify the state of the
browser and the HTML page are stored.
A collection is a set of things grouped together by the DHTML object model. For
example, it can be a collection of links, frames, forms, and other elements such
as images.
What is XML?
2. <HTML>
<HEAD>
<TITLE> Sample HTML Page </TITLE>
</HEAD>
<BODY>
<H1>This is the main heading</H1>
<P> Here is a bulleted list: </P>
<HR>
<UL>
<LI>Item1</LI>
<LI>Item2
<UL>
<LI>Item 2A</LI>
<LI>Item 2B</LI>
</UL></LI>
<LI>Item3</LI>
<LI>Item4</LI>
</UL>
<HR>
<P>………and the page continues…</P>
</BODY>
</HTML>
3. <HTML>
<HEAD>
<TITLE>BASIC CPR</TITLE>
</HEAD>
<BODY>
BASIC CPR
<OL>
<LI>Use Body Substance Isolation Precautions<p>
If available, be sure to use latex or vinyl gloves, goggles and a barrier
device with one-way valve. <BR><EM> BSI is crucial to your safety and
the safety of your patient. </EM>
<LI>Determine Unresponsiveness
<LI>Open Airway
<LI>Look, Listen and Feel for breathing
<LI>Ventilate Twice
</OL>
<P>Look for chest rises and listen for exhalation while ventilating. If no air
enters, reposition the airway and try again. </P>
<H3>CIRCULATION</H3>
<OL>
<LI>Check for Pulse
<LI> If No Pulse, Begin Compressions
</OL>
</BODY>
</HTML>
4. <HTML>
<HEAD>
<TITLE>PATIENT ASSESSMENT</TITLE>
</HEAD>
<BODY>
<OL TYPE=A>
<LI>Safety Considerations
<OL TYPE=1>
<LI>Body Substance Isolation
<LI>Scene safety
<LI>Initial Size-up
</OL>
<LI>INITIAL PATIENT ASSESSMENT
<OL TYPE=1>
<LI>General Impression
<LI>Unresponsiveness
<OL TYPE=i>
<LI>Alert to person, place and time
<LI>Verbal response to audible stimuli
<LI>Pain evokes verbal or physical response
<LI>Unresponsive to all stimuli
</OL>
</OL>
<LI>PATIENT CRITICAL NEEDS
<UL>
<LI TYPE="square">Use oxygen if needed
<LI TYPE="square">Consider use of assisting with bag valve
mask
</UL>
<LI>MEDICATIONS
<UL>
<LI TYPE="circle">Oral Glucose
<LI TYPE="disc">Activated Charcoal
</UL>
<MENU>
<LI>ListItem1
<LI>ListItem2
</MENU>
</BODY>
</HTML>
5. <HTML>
<HEAD>
<TITLE>TABLE OF INFORMATION</TITLE>
</HEAD>
<BODY>
<TABLE border=3 width=75%>
<TR>
<td colspan = 2>Cell 1.1 <td>Cell 1.2 <td>Cell 1.3
<TR>
<td>Cell 2.1 <td>Cell 2.2 <td>Cell 2.3
<TR>
<td>Cell 3.1 <td>Cell 3.2 <td>Cell 3.3
</TABLE>
</BODY>
</HTML>
6. <HTML>
<HEAD>
<TITLE>EXAMPLE OF TABLE</TITLE></HEAD>
<BODY>
<TABLE COLS="7">
<COLGROUP SPAN="3" WIDTH="20%">
<COLGROUP SPAN="4" WIDTH="10%">
<TR>
<TD>CONTENT1 <TD>CONTENT2 <TD>CONTENT3
<TD>CONTENT1<TD>CONTENT2<TD>CONTENT3<TD>CONTENT4
<TR>
<TD>CONTENT1 <TD>CONTENT2 <TD>CONTENT3
<TD>CONTENT1 <TD>CONTENT2 <TD>CONTENT3
<TD>CONTENT4
</TABLE>
</BODY>
</HTML>
7. <HTML>
<HEAD>
<TITLE>INCIDENT LOG</TITLE>
</HEAD>
<BODY>
<H1>Volunteer Time Record</H1>
<TABLE BORDER="0" WIDTH="75%" CELLSPACING="0"
CELLPADING="0">
<CAPTION ALIGN="TOP">Prepared for the month of February
1997</CAPTION>
<TR ALIGN="CENTER" VALIGN="CENTER">
<TD WIDTH="50%" NOWRAP="NOWRAP">Firefighter ID: 294</TD>
<TD WIDTH="50%" NOWRAP="NOWRAP">Report Date: 11-Mar-
97</TD>
</TR><TR>
<TD COLSPAN="2"><P><CENTER>F=Fire E=Emergency
Medical H=HazMat T=Training</CENTER></P>
</TD>
</TR>
</TABLE>
<HR>
<TABLE COLS="3">
<THEAD>
<TR>
<TH>Incident Date
<TH>Incident Time
<TH>Incident Type
</THEAD>
<TBODY ALIGN="LEFT" VALIGN="TOP">
<TR ALIGN=LEFT>
<TD>Feb 01, 1997
<TD>09:00
<TD>T
<TR ALIGN=LEFT>
<TD>Feb 01, 1997
<TD>22:00
<TD>E
<TR ALIGN=LEFT>
<TD>Feb 03, 1997
<TD>19:00
<TD>T
<TR ALIGN=LEFT>
<TD>Feb 05, 1997
<TD>19:00
<TD>T
<TR ALIGN=LEFT>
<TD>Feb 06, 1997
<TD>15:10
<TD>F
<TR ALIGN=LEFT>
<TD>Feb 10, 1997
<TD>19:00
<TD>T
<TR ALIGN=LEFT>
<TD>Feb 12, 1997
<TD>19:00
<TD>T
<TR ALIGN=LEFT>
<TD>Feb 14, 1997
<TD>18:00
<TD>T
<TR ALIGN=LEFT>
<TD>Feb 15, 1997
<TD>09:00
<TD>T
<TR ALIGN=LEFT>
<TD>Feb 17, 1997
<TD>12:30
<TD>E
</TBODY>
</TABLE>
<HR>
</BODY>
</HTML>
8. <HTML>
<HEAD><TITLE>MORE ABOUT TABLE</TITLE></HEAD>
<BODY>
<TABLE border="0" cellspacing="20" bgcolor="#CCCCCC">
<CAPTION>ALBUMBS AND SINGLES</CAPTION>
<TR>
<TD>
<TABLE border="10" cellpading="4">
<CAPTION>ALBUMBS </CAPTION>
<TR><TD><I>Little Earthquakes</I><TD>82358-2
<TR><TD><I>Under The Pink</I><TD>82567-2
<TR><TD><I>Boys For Pele</I><TD>82862-2
</TABLE>
</TD>
<TD>
<TABLE border="10" cellpading="4">
<CAPTION>SINGLES </CAPTION>
<TR><TD>"Crucify"<TD>82399-2
<TR><TD>"God"<TD>85687-2
<TR><TD>"Cornflake Girl"<TD>85655-2
<TR><TD>"Caught A Lite Sneeze"<TD>85519-2
</TABLE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
9. <HTML>
<HEAD>
<TITLE>A TWO-COLUMN LAYOUT EXAMPLE</TITLE>
<BODY>
<TABLE width=100% cellspacing=15 border=0>
<TR valign="top">
<TD width=33%>
</TD>
<TD width=67% id="tblTitle">
<H1>Backcountry Travel</H1>
</TD>
<TR valign="top">
<TD>
<DL>
<DT><STRONG><A href="#intro"
alt="Introduction">Introduction</A></STRONG>
</DL>
<DL>
<DT><STRONG><A href="#prepare" alt="Preparation">Before You
Travel</A></STRONG>
<DD><EM>How far can you go? <BR>
What should you wear? <BR>
What should you carry? <BR>
What else should you do? </EM>
</DL>
<DL>
<DT><STRONG><A href="#lost" alt="In To Travel">When things go
wrong</A></STRONG>
<DD><EM>Stay! <BR>
Think! <BR>
Observe! <BR>
Plan! </EM>
</DL>
</TD>
<TD>
<P><A name="intro.">Walking in the woods, </A> whether as a hiker,
camper, backpacker or hunter, provides plenty of opportunities to practice
the skills of a backcountry traveler...</P>
<BLOCKQUOTE>
<EM>
This is in no way intended to be a course in backcountry safety or survival.
It's you against the wall, and we are not talking any responsibility for the
outcome.
</EM>
</BLOCKQUOTE>
<H2><A name="prepare"> Before you travel</A></H2>
<H3>How far can you go? </H3>
<P>When choosing a location and route, take into account your physical
condition, the reason for hiking, and the terrain and weather you
could possibly encounter.........</P>
<H3> What should you wear? </H3>
<P>Proper footgear is one of the most important parts of your journey.
Sturdy running shoes are good for hiking, on relatively smooth surfaces,
such as maintained trails...</P> <H3>What should you carry? </H3>
<P>For short trips, a fanny pack or day pack should include at least one
quart of water per person, map, flashlight, first aid kit, rain gear, high-
energy snack, toilet paper.........</P> <H2><A name="lost">When things
go wrong</A></H2>
<BLOCKQUOTE><EM>The worst thing you can do is to get frightened.
The truly dangerous enemy is not the cold or the hunger, so much as the
fear. It robs the wanderer of his judgement and of his limb power; it is fear
that turns the passing experience into a final tragedy.........keep cool
and all will be well.... Use what you have, where you are, right now.
</EM><BR>
<CITE>Ernest Thompson Seton, 1906</CITE>
</BLOCKQUOTE>
<P>So, you've planned, you've prepared, and now you are on the trail and
the worst part is, you don't know where you are. There is a four step
process to follow, and all you have to do is STOP</EM>---
<STRONG>S</STRONG>tay.
<STRONG>T</STRONG>hink.
<STRONG>O</STRONG>bserv.
<STRONG>P</STRONG>lan. </P>
<EM>............More stuff here...........</EM>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
10. <HTML>
<HEAD><TITLE>PICTURE</TITLE>
</HEAD>
<BODY>
<H1>Birthday Cake </H1>
<P>
It's not for me. It's not my birthday. But I like this very much. It’s my
favorite.
<IMG SRC="Cake.jpg" align="middle" ALT="[A birthday party cake.]">
This is for my best friend. She likes this type of cake very much. That's
why I like this very much. I will give it to her. When she will get it, I think
she will be happy.
</P>
<HR>
<P>
To find out so many types of cakes you visit Internet, and you can see so
many things.
</BODY>
</HTML>
11. <HTML>
<HEAD><TITLE>FORM</TITLE></HEAD>
<BODY bgcolor=CYAN>
<FORM name=form method=post>
<FIELDSET>
<LEGEND><H2>BUILD YOUR PIZZA</H2></LEGEND>
<LABEL><H3>PICK YOUR TOPPINGS: </H3>
<INPUT type="checkbox" name="topping" value="cheese"
checked>Cheese<BR>
<INPUT type="checkbox" name="topping"
value="pepperoni">Pepperoni<BR>
<INPUT type="checkbox" name="topping"
value="shrooms">Mushrooms<BR>
<INPUT type="checkbox" name="topping" value="clams">Smoked
Clams<BR>
</LABEL>
<H3>PICK A CRUST: </H3>
<INPUT type="radio" name="crust" value="deep dish" checked>Deep-
Dish<BR>
<INPUT type="radio" name="crust" value="hand tossed">Hand
Tossed<BR>
<INPUT type="radio" name="crust" value="whole wheat">Whole
Wheat<BR>
<H3>Where should the pizza go:</H3>
NAME: <INPUT type="text" name="name" size="20"><BR>
ADDRESS: <INPUT type="text" name="address" size="40"><BR>
APT #: <INPUT type="text" name="apartment" size="6"><BR>
CITY, STATE ZIP: <INPUT type="text" name="city" size="40">
: <INPUT type="text" name="state" size="2">
: <INPUT type="text" name="zipcode" size="10">
12. <HTML>
<HEAD><TITLE>FORM2</TITLE></HEAD>
<BODY bgcolor=pink>
<FORM>
<H2> INFORMATION REQUEST</H2>
<BR>
FIRST NAME: <INPUT type=text name=t1 size=15 maxlength=30>
<BR>LAST NAME: <INPUT type=text name=t2 size=15 maxlength=30>
<BR>E-MAIL ADDRESS: <INPUT type=text name=t3 size=20
maxlength=30>
<BR>ADDRESS: <INPUT type=text name=t4 size=30 maxlength=50>
<BR>CITY<INPUT type=text name=t5 size=10 maxlength=25>
STATE: <INPUT type=text name=t6 size=15 maxlength=30>
<BR>COUNTRY: <INPUT type=text name=t7 size=20
maxlength=30><BR><BR>
PLEASE CHOOSE THE MOST APPROPRIATE STATEMENT.
<BR><INPUT type="radio" name="buying" value="regular">
I regularly purchase items online.
<BR><INPUT type="radio" name="buying" value="sometimes">
I have on occasion purchased item online.
<BR><INPUT type="radio" name="buying" value="might" checked>
I have not purchased anything online, but I would consider it.
<BR><INPUT type="radio" name="buying" value="willnot">
I prefer to shop in real stores.
<br><br>
<P> I'm interested in (choose all that apply):
<BR><INPUT type="checkbox" name="Hiking" value="Hiking"> Hiking
<BR><INPUT type="checkbox" name="MBiking" value="MBiking">
Mountain Biking
<BR><INPUT type="checkbox" name="Camping"
value="Camping">Camping
<BR><INPUT type="checkbox" name="RClimbing"
value="RClimbing">Rock Climbing
<BR><INPUT type="checkbox" name="4WD" value="4WD">Off-Road
4WD
<BR><INPUT type="checkbox" name="ccskiing" value="ccskiing">Cross-
country skiing
<BR>
<BR> I learned about this site from: <BR>
<SELECT name="referral" size=2>
<OPTION value="print" selected>Print Ads
<OPTION value="visit">In-Store Visit
<OPTION value="rec">Friend's Recommendation
<OPTION value="internet">Sources on the Internet
<OPTION value="other">Other
</SELECT><BR><BR>
<TEXTAREA name="comments" COLS="40" ROWS="5">
Please type any additional comments here. </TEXTAREA>
<BR><BR>
Please paste this photo I took into your gallery!
<INPUT type="file" name="filenew" size="20" accept="image/*">
<BR><BR><CENTER><INPUT type="submit" value=submit>
<INPUT type="reset" value=reset>
</FORM>
</BODY>
</HTML>
13. <HTML>
<HEAD><TITLE>FRAME</TITLE></HEAD>
<FRAMESET cols=”50%, *”>
<FRAMESET rows=”50%, *”>
<FRAME src=”frame1.htm”>
<FRAME src=”frame2.htm”>
</FRAMESET>
<FRAME src=”frame3.htm”>
<FRAME src=”frame4.htm”>
<FRAME src=”frame5.htm”>
</FRAMESET>
</HTML>
14 <HTML>
<HEAD><TITLE>FRAME</TITLE></HEAD>
<BODY>
<H1>This is your city reference</H1>
<P><A href="ny.htm" target="cities">Go to the New York Page.
</A></P>
<P><A href="paris.htm" target="cities">Go to the Paris Page. </A></P>
<P><A href="tokyo.htm" target="cities">Go to the Tokyo Page. </A></P>
</BODY>
</HTML>
ny.htm
<HTML>
<HEAD><TITLE>NY</TITLE></HEAD>
<BODY>
<H1>Welcome to the New York Page</H1>
How about a Broadway show?
</BODY>
</HTML>
Paris.htm
<HTML>
<HEAD><TITLE>Paris</TITLE></HEAD>
<BODY>
<H1>Welcome to the Paris Page</H1>
Very fine.
</BODY>
</HTML>
Tokyo.htm
<HTML>
<HEAD><TITLE>Tokyo</TITLE></HEAD>
<BODY>
<H1>Welcome to the Tokyo Page</H1>
Very Interesting.
</BODY>
</HTML>
15. <HTML>
<HEAD><TITLE>STYLE SHEET1</TITLE></HEAD>
<STYLE>
P {background-color: blue;
position: absolute;
left: 40px;
top: 40px;
width: 300px;
height: 260px;
z-index: 1}
BLOCKQUOTE {background-color: yellow;
position: absolute;
left: 80px;
top: 80px;
width: 300px;
height: 260px;
z-index: 2}
</STYLE>
</HEAD>
<BODY>
<BLOCKQUOTE>
<FONT size=7>Do you want to play hide and seek?</FONT>
</BLOCKQUOTE>
<P><FONT size=7>Count to ten. </FONT></P>
</BODY>
</HTML>
16. <HTML>
<HEAD><TITLE>IMG EXAMPLE</TITLE></HEAD>
<BODY BGCOLOR=GRAY>
<IMG SRC="bgmc.jpg" align=left WIDTH=150 HEIGHT=150 border=1>
MASTER CARD
<BR>
<IMG SRC="bgjcb.jpg" align=left WIDTH=150 HEIGHT=150 border=3>
JCB INTERNATIONAL
<BR>
<IMG SRC="bgvisa.jpg" align=left WIDTH=150 HEIGHT=150 border=5>
VISA CARD
<BR>
</BODY>
</HTML>
17. <HTML>
<HEAD><TITLE>NAMED FRAMES</TITLE></HEAD>
<FRAMESET COLS="1*, 3*">
<FRAME src="ny.htm" NORESIZE FRAMEBORDER=1>
<FRAME src="ex17.htm" name="IMG EXAMPLE">
<NOFRAMES>
<BODY>
YOUR BROWSER DOES NOT DISPLAY FRAMES.
<A href="ex12.htm">go there</A>
</BODY>
</NOFRAMES>
</FRAMESET>
</HTML>
18. <HTML>
<HEAD><TITLE>TV SCHEDULE</TITLE></HEAD>
<BODY bgcolor=pink>
<TABLE border="5" align=center cellpadding=7 bgcolor=pink>
<CAPTION>Television Schedule for Monday</CAPTION>
<COLGROUP align=center width=75><! -- first column: headings -->
<COLGROUP><!--columns 2 and 3: 6AM-->
<COL align="center" width="75">
<COL align="left" width="*">
<COLGROUP><!--columns 4 and 5: 7AM-->
<COL align="center" width="75">
<COL align="left" width="*">
<THEAD VALIGN="bottom" align="center">
<TR>
<TH rowspan="3">Channel</TH>
<TH colspan="4">Time</TH>
<TR>
<TH colspan="2">6 AM</TH>
<TH colspan="2">7 AM</TH>
<TR>
<TH>Show</TH>
<TH>Description</TH>
<TH>Show</TH>
<TH>Description</TH>
<TBODY align="CENTER">
<TR>
<TD>3
<TD>CHIPS
<TD>Ponch discovers some stolen Pentium processors.
<TD>The Munsters
<TD>Herman creates a family home page. The cops confiscate his
computer.
<TR>
<TD>7
<TD>I love Lucy
<TD>Lucy surfs the web and accidentally charges $50,000 to her
VISA.
<TD>The X-files
<TD>Scully and Mulder investigate some alien-infested table
cells.
</TABLE>
</BODY>
</HTML>
19. <HTML>
<HEAD><TITLE>BUILDING A CAKE</TITLE></HEAD>
<STYLE type="text/css">
<!--
BODY {font-family: "Times Roman" serif;
font-size: 18pt;
color: black;
background: white url(bgcc.jpg) repeat fixed right top;
margin: 10px 15px}
H1 {font-size: 24pt;
color: white;
background color: blue;
padding: 5px;
border: 2px double black}
---!>
</STYLE>
</HEAD>
<BODY>
<H1> HELLO...........WELCOME</H1><BR>
<FONT face=arial size=6 COLOR=RED>WINSERV
TECHNOLOGY</FONT>
</BODY>
</HTML>
20. <HTML>
<HEAD><TITLE>ELEMENT BOX WIDTH EXAMPLE</TITLE></HEAD>
<STYLE>
<!--
BODY (font-family: "Arial Black", Impact, sans-serif;
font-size: 16pt}
P.twenty {width: 20%;
border: 4px solid blue}
P.fifty {width: 50%;
border: 6px blue}
P.eighty {width: 80%;
border: 10px solid blue}
P.hundred {width: 100%;
border: 12px solid blue}
--!>
</STYLE>
<BODY>
<P CLASS="twenty">This paragraph has a style sheet width of 20%</P>
<P CLASS="fifty">This paragraph has a style sheet width of 50%</P>
<P CLASS="eighty">This paragraph has a style sheet width of 80%</P>
<P CLASS="hundred">This paragraph has a style sheet width of
100%</P>
</BODY>
</HTML>
21.
<HTML>
<HEAD>
<TITLE> WORKING WITH DIVs </TITLE>
</HEAD>
<BODY>
<DIV ID=box1 style=”background-color: red; position: absolute; left:
300; top: 150; width: 50”>
<IMG SRC=images/SCT-LOGO.JPG>
</DIV>
<DIV ID=box2 style=”background-color: red; position: absolute; left: 380;
top: 150; width: 50”>
<IMG SRC=images/SCT-LOGO.JPG>
</DIV>
<DIV ID=box3 style=”background-color: red; position: absolute; left: 300;
top: 190; width: 50”>
<IMG SRC=images/SCT-LOGO.JPG>
</DIV>
<DIV ID=box4 style=”background-color: red ; position: absolute; left: 380;
top: 190; width: 50”>
<IMG SRC=images/SCT-LOGO.JPG>
</DIV>
</BODY>
</HTML>