HTML
HTML
HTML
Internet: The internet is a “network of networks”. It is a global collection of high powered computers
that are connected to each other with network cables telephone lines, microwave dishes, satellites etc.
Server: Computer storing documents, sound files, video clips, program files, electronic shopping
centres, animations, pictures, interactive contents and other information and presenting them
electronically to others on net are known as servers.
Gateway: A Gateway is a communication device or programs that pases data between networks having
similar funtions but dissimilar implemetations.
Ineternet Service Providers(ISP): ISP is a interenet service provider on periodical charges and/or
installation charges. Serial Line Input Protocol(SLIP) or Point to Point Protocol (PPP) is used for
connecting internet. This allows the users to surf without any intervention of the ISP servers. TCP/IP
connection internet must have PPP and SLIP protocols.
Modem: (Modular/Demodular) Modem is a device to translate the digital signals to analog and vice
versa. (Integrated Services Digital Network) ISDN is a digital telephone network which provides fastest
internet for the users.
How Internet Works : Once you send the mail. The user and the Recipient may be on different
networks, its like calling a local telephone number and asking for the area code. The exact IP Address
may be away from the User. There may be many networks which the user mail has to cross to reach the
recipient. The email is broken into many pieces and sent in many packets, routers will redirect the
packets to the destination. The mails while passing through networks are stored in different places with a
table of contents & addresses, and sent at their leisure.
WWW: Berner Lee is known as father of Word Wide Web. It’s a consortium.
Search Engines: Search engines provide the information based on certain keyword/keyword
combination. Ex : Google.com, infoseek.com, altavista.digital.com, cyber411.com.
Helper Application: Helper applications are small programs which take little space in the memory of
your computer to play certain files, audio, video, etc on your system. They will be downloaded by the
browser automatically and play the file on your system. Ex: Quick Time, Real Player etc.
Types of Emails :
(a) Web Based Free E-Mail These mails are free on the net, but you have to bear with the
advertisements they pose. Ex. Google, yahoo, hotmail etc.
(b) Internet – Based Forwarding Services NetForward.com is an example, which will allow you
give all your emails of different free-email services and get one email and address from them so
that you can attend to all the emails with one ID and Password.
(c) E-mail Service Providers They are superior in quality of service and solutions. ESPs use X.25
or X400 protocol for email. Return confirmation, prioritization of mails are few advantages of
this system. Charges are made as per the volumes of mails.
(d) Email through Internet Service Provider: This is known as Gateway Internet Service,
generally based on Unix and text based mails.
Protocol : A protocol is a set of rules to be followed while communicating with other computers. The
protocol mentions the style of bits on net for lower levels(the bit sequence for reading information) and
exchange for high level application programs (the way two programs send a file on net).
SLIP(Serial Line Internet Protocol) and PPP(Point to Point Protocol) are used by ISPs to connect their
users on their servers.
POP (Post Office Protocol) & SMTP(Simple Mail Transport Protocol) are two protocols used for mail
services.
FTP (File Transfer Protocol) is a protocol used for transferring files on net. To transfer files using FTP,
one needs a client program and a server program. FTP server is a program on a computer which will
assist the files to be downloaded to client computer. Its like an online library. Windows provides a
program for FTP called ftp.exe. Type ftp in the run command from start button. WSFTP is also a
program which allows to upload files to a server.
Protocols for EMail: There are two mail protocols POP(Post Office Protocol) and SMTP(Simple Mail
Transfer Protocol). All the ISPs have POP and SMTP servers for maintaining emails.
WWW consortium is a combination of private industries and universities that work together to guide
technical development of the Web and set the web standards. RFC(Request For Comments) is one way
how you can get information about internet. Each RFC has a number to address.
HTML(Duration 10 Days)
Hyper Text Markup Language
Addressing computers on net is done in two ways (a) Domain names and (b) IP Addresses.
Ex1: .com – commercial, .edu – Education, .gov – government, .mil – military networks.
Ex2: .in – India, .de – Germany, .np – Nepal, .nz – New Zealand.
DNS Server: Domain Name Service (DNS) servers translates the domain name of another computer into
an IP(Internet Protocol) address and vice versa on request. A format called Domain Name System is
followed by all computers on net.
Server : Server is the computer which provides the information. It has server side scripts for handling the
requests of the client and sending the data required. It has a IP Address and Domain Name.
Client: Client is the user of the information which is provided by the server. It can ask information and
collect the data and display.
Browser : A Browser is a software programme which connects other systems on the world wide web. It
automatically connects other systems, maintains connections, maintains memory cache, and displays the
data in a formatted style that a user can understand. Ex: Internet Explorer, Netscape Navigator, Mozilla
FireFox etc.
Java Plug-In A java plug-in is incorporated in almost all the latest browsers. This is an additional
software for the browsers for extending the facilities of programming to User and Server.
URL: Uniform Resource Locator is the address of any file. For ex “HTTP://WWW.Google.com”
contains two parts (a) HTTP which is the protocol which has to be used along with this site. (b)
“Google.com” which gives the domain.
Ex: “http//www.w3.org/TR/REC-html40/” means There is a document available via the HTTP protocol,
residing on the machine www.w3.org, accessible via the path “/TR/REC-html40/”.
(a) Fragment Identifiers : This kind of URI which denotes a link within the current page ends with
“#” followed by an anchor identified (fragment identifier). Ex :
“http/mywebsite.com/html/top.html#section_2” indicates that “section_2” is an anchor in
top.html page.
(b) Relative URI’s: Denotes a path which is in relation to the current directory. One level up/down
to the current directory. Relative path is resolved to full URI’s using the base URI. Base URI is
the path of the current directory.
What is HTML?
HTML is a language for describing web pages.
HTML stands for Hyper Text Markup Language
HTML is not a programming language, it is a markup language
A markup language is a set of markup tags
HTML uses markup tags to describe web pages
The browser will remove extra spaces and extra lines when the page is displayed.
HTML is not case sensitive. No difference between “TEXT” and “text”.
HTML Structure :
<HTML>
<HEAD>
</HEAD>
<BODY>
YOUR CODE HERE
</BODY>
</HTML>
HTML Tags
HTML markup tags are usually called HTML tags
HTML tags are keywords surrounded by angle brackets like <html>
HTML tags normally come in pairs like <b> and </b>
The first tag in a pair is the start tag, the second tag is the end tag
Start and end tags are also called opening tags and closing tags.
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph</p>
</body>
</html>
Container Tags
Container tags are those having text or tag elements in the middle and start with a tag and end with
another tag. Ex.
Empty Tags
HTML elements without content are called empty elements. Empty elements can be closed in the start
tag. <br> is an empty element without a closing tag (it defines a line break). In XHTML, XML, and future
versions of HTML, all elements must be closed so use <br /> instead is more future proof.
Attributes provide additional information about HTML elements. Attributes are always specified in the
start tag Attributes come in name/value pairs like: name="value"
Attribute values should always be enclosed in quotes. Double/Single style quotes allowed.
Below is a list of some attributes that are standard for most HTML elements:
(d) Body : contains all the elements that a browser actually displays as the body of your HTML
document.
HTML Headings
There are six levels of Heading tags viz, <H1>, <H2>, <H3>, <H4>, <H5>, and <H6>. H1 tag contains
the biggest size of characters and H6 contains the lowest size of characters.
Ex: 1.
<HTML>
<HEAD>
<TITLE>
MY FIRST WEB PAGE
</TITLE>
<HEAD>
<BODY>
<H1>This is a top-level heading </H1>
<H2> This is a second level heading </H2>
<H3>This is a third level heading </H3>
<H4> This is a fourth level heading</H4>
<H5> This is a fifth level heading</H5>
<H6> This is a sixth level heading</H6>
</BODY>
</HTML>
HTML Paragraphs
<P> tag specifies the beginning of a paragraph. When you define a new P tag it automatically
implies that it’s the beginning of a new paragraph. So you can use only the starting P tag.
Ex:
<HTML><BODY>
This line will <br/> be displayed in <br/> three lines</br>
</BODY></HTML>
Comments in HTML
<!-- and --> are the tags used for commenting out in the HTML file.
Ex: <!-- type your comments here -->
<HTML>
<HEAD>
<TITLE>
MY FIRST HTML
</TITLE>
<HEAD>
<BODY>
<H1>Hyper Text Markup Language</H1>
<P>
In this unit you are going to learn some basics of HTML, which is used to write HTML documents. Once
you create an HTML document it can be viewed in any browser.
<P>
You will be learning how to use List and Hyperlink text effectively in your document.
</BODY>
</HTML>
FORMATTING TEXT
Bold : <B> and </B> is used to bold the text between the start and end tags.
Italic : <I> and </I> is used to italicize the text between the start and end tags.
Underline : <U> and </U> is used to underline the text between the start and end tags.
Ex: 3 Formating
<HTML>
<HEAD>
<TITLE>
MY Formatting tags
</TITLE>
<HEAD>
<BODY>
<H1><B>This line is in bold</B></H1>
<BR/><BR/>
<H2><I> This line is in italics</I><H2>
<H3><BLOCKQUOTE> This text is in “blockquote” tags and is displayed with an indent on left margin
of five spaces and right margin with five spaces. The text will be justified in the middle. Any type of
formatting is possible with PRE tag. This tag displays the contents as you enter in the document. It is
known as pre-defined text style. This is useful when entering columnar data. </BLOCKQUOTE>.
</H3>
</BODY>
</HTML>
Character Entities
“<” symbol defines the start of an HTML tag but if we want the symbol be inserted then character
entities in the HTML source are used.
A character entity has three parts: an ampersand (&), an entity name or a # and an entity
number, and finally a semicolon (;). Entity number are more reliable than entity names.
Note that the entities are case sensitive.
To display a less than sign in an HTML document we must write: < or <
<HTML>
<HEAD>
<TITLE> DEMO OF TEXT FORMATTING</TITLE>
<HEAD>
<BODY>
<P><H2>THIS IS DEMONSTRATION OF TEXT FORMATTING.</H2>
<HR NOSHADE>
<P>THE TEXT APPEARS NORMAL BUT
<P>MATHEMETICAL EXPRESSIONS LIKE 245<SUP>21</SUP>
<p>ORDINALS LIKE 21<SUP>st</SUP> AND
<P>CHEMICAL COMPOSITIONS LIKE H2 SO<SUB>4</SUB><BR/>
ARE EXPRESSED COMFORTABLY WITH THIS FORMATTING TAGS.
</BODY>
</HTML>
Text Alignment
The “ALIGN” attribute can be used with headings to align the text within the window. The
attribute has values as LEFT/RIGHT/CENTER/JUSTIFY.
<P> tag also can contain “ALIGN” attribute with LEFT/RIGHT/CENTER values.
<CENTER></CENTER> tags can be used with any combination of text, images, tables etc to
center the whole contents.
<HTML>
<HEAD>
<TITLE> DEMO OF TEXT ALIGNMENT</TITLE>
<HEAD>
<BODY>
<P><CENTER>
(create some random text and place it here)
</CENTER>
<CENTER><IMG SRC=FLOWERS.JPG></CENTER>
See image, which is also centered to the window.
</BODY>
</HTML>
<HTML>
<HEAD>
<TITLE> Font size DEMO</TITLE>
<HEAD>
<BODY>
<FONT SIZE=1>Font Size 1 </FONT><BR/>
<FONT SIZE=2>Font Size 2 </FONT><BR/>
<FONT SIZE=3>Font Size 3 </FONT><BR/>
<FONT SIZE=4>Font Size 4 </FONT><BR/>
<FONT SIZE=5>Font Size 5 </FONT><BR/>
<FONT SIZE=6>Font Size 6 </FONT><BR/>
<FONT SIZE=7>Font Size 7 </FONT><BR/>
<HR SIZE=9 NOSHADE>
<CENTER>THIS IS THE DEFAULT SIZE OF FONT, THAT IS 3.
<P><BASEFONT SIZE=5>
AFTER USING "BASEFONT SIZE=5", THIS IS THE TEXT IN 5. <BR/> <BR/>
<FONT SIZE=-2>AFTER USING "FONT=-2", THIS IS THE TEXT IN 3.
<BR/><BR/></FONT>
<FONT SIZE =+1>AFTER USING "FONT =+1", THIS IS THE TEXT IN 6</FONT>
<HR SIZE=9 NOSHADE>
<H3 ALIGN=CENTER><u>USING THE BIG AND SMALL TAGS</U></H3>
<BASEFONT SIZE=3>
<SMALL>THIS TEXT IS BETWEEN THE SMALL TAGS DECREASING BASEFONT FROM 3
TO 2, RELATIVELY.</SMALL>
<P><BIG>THIS TEXT IS BETWEEN THE BIG TAGS INCREASING BASEFONT FROM 3 TO
4, RELATIVELY</BIG>
</CENTER>
</BODY>
</HTML>
The <FONT> tag is used to display the color with “COLOR” attribute. Any of the 16 colors can
be used as value to the COLOR attribute. Basic colors are (1)Black, (2)White, (3)Aqua, (4)Blue,
(5)Fuchsia, (6)Gray, (7)Green (8)Lime, (9)Maroon (10)Navy (11)Olive (12)Purple (13)Red
(14)Silver (15)Teal and (16)Yellow.
Preformatted text: The <PRE> and </PRE> tags are used to display a block of
“preformatted” text. The display will be “as is” state of text.
Ex : 4 Preformatting Tag
<HTML>
<HEAD>
<TITLE>
Pre-formatting tags in html
</TITLE>
<HEAD>
<BODY>
<PRE>
SALES FIGURES FOR FIRST QUARTER OF 2008
----------------------------------------------------------
-------------------------------------------------------------------------
JAN FEB
-------------------------------------------------------------------------
ANDERSON 10,200 20,015
BAKER 30,500 25,885
PETERSON 15,900 20,115
WILSON 40,100 35,000
------------------------------------------------------------------------
GRAND TOTAL 96,700 101,015
------------------------------------------------------------------------
</PRE>
</BODY>
</HTML>
Creating Lists
Ordered List
<OL> and </OL> tags specify a sequentially numbered list of items. It is used in conjunction
with <LI> tag. LI tag does not have end tag, its implied.
Attributes:
TYPE : specifies the type of format ex.A, a, L i, 1.
START : sepifies the start no eg 2, c, etc.
<HTML>
<HEAD>
<TITLE>My test on Ordered List tag</TITLE>
</HEAD>
<BODY>
<OL>
<LI>COMPUTER CONCEPTS
<LI>MS-ACCESS
<LI>MS-EXCEL
<LI>MS-WORD
<LI>MS-POWERPOINT
</OL>
</BODY>
</HTML>
Unordered List
<UL> and </UL> define a bulleted list of items. The <LI> tag is nested inside the UL tag and
defines each item within the list.
Attributes
TYPE : specifies the style of bullets like “disc”, “circle”, and “square”. These are supported by
Netscape Navigator.
With Hyperlinks you can link to other sources like web page, display an image, download a
program, send an e-mail message etc.
Anchor tag(<A> & </A>) is used for hyper linking. The Target is mentioned in the start tag and
the text is written between the anchors.
HREF (Hyper Reference) attribute specifies the URL. If partial URL or only file name is
mentioned, it means that the file is located on the same server. Otherwise complete URL is a
must. There are three types of links in HTML.
Target Link : <A NAME=”sec1”>This is the contents of the section one which
would appear for the user after the jump</A>
Target attribute
Create three HTML files by name Linktype1.html, Linktype2.html, and mainlink.html in the same
directory and third file with the list of links.
Contents of linktype1.HTML:
<HTML>
<HEAD>
<TITLE>LINK FILE ONE </TITLE>
</HEAD>
<BODY>
<H2>Here are the contents of file one</H2>
<P>
(enter random text with =rand(9) in word and copy here and put<P> before
paragraphs)
</BODY>
</HTML>
Contents of linktype2.HTML:
<HTML>
<HEAD>
<TITLE>LINK FILE TWO </TITLE>
</HEAD>
<BODY>
<H2>Here are the contents of file Two with sub section</H2>
<P>
(enter random text with =rand(9) in word and copy here and put<P> before
paragraphs)
</A>
</BODY>
</HTML>
Contents of mainlink.HTML:
<HTML>
<HEAD>
<TITLE>LINK LIST </TITLE>
</HEAD>
<BODY>
<H2>COURSES</H2>
<UL>
<LI><A HREF=linktype1.html>Normal Link to another HTML file</A>
<LI><A HREF=#bottom>Link to another Section in same page</A>
<LI><A HREF="linktype2.html#sec1" TARGET=”_blank”>Section-wise Link to another
HTML File</A>
<BR/>
<BR/>
(enter random text with =rand(9) in word and copy here and put<P> before
paragraphs)
<A NAME=bottom><h2>Bottom</h2><P>
(contents of last paragraph come here)
</A>
</UL>
</BODY>
</HTML>
<IMG> Attributes
Resizing images
HEIGHT and WIDTH attributes leave space for the image and go ahead with rest of loading.
Values can be in pixels or percentage.
<HTML>
<HEAD>
<TITLE> Image as Hyperlink</TITLE>
</HEAD>
<BODY>
<H2><U>
This is an image which can be used as hyperlink to connect to linktype1.html file
<P>You can use both text and also image as a hyperlink.
</U></H2>
<P>
<A HREF=LINKTYPE1.HTML>CLICK HERE <IMG SRC="BLUE HILLS.JPG" WIDTH=400
HEIGHT=350 ALIGN=RIGHT border=12 ALT="A simple image">
</BODY>
<HTML>
HR Attributes
SIZE Gives thickness for the line
COLOR Mentions color for the line
WIDTH Gives length of the line as %
ALIGN Specifies alignment – RIGHT/LEFT/CENTER
NOSHADE Without shade a solid line
<HTML>
<HEAD>
<TITLE> Horizontal Rulers</TITLE>
</HEAD>
<BODY>
<H2><u>
THIS IS DEMONSTRATION OF HORIZONTAL RULERS.
</H2><P> YOU CAN SEE THE DEFAULT LINE BELOW THIS TEXT
<HR NOSHADE>
<P> RESIZE THE WINDOW TO SEE THE SIZE OF RULERS CHANGE IN CONTEXT WITH THE
WINDOW<P>
</U></H2>
<P>
<HR SIZE=24 NOSHADE WIDTH=43% ALIGN=LEFT>
<P>
<A HREF=linktype1.html><IMG SRC="blue hills.Jpg" width=400 height=350 border=12
alt="A simple image">
ADDRESS TAG
The address tag contains information on contact details. Horizontal ruler usually seperates an
address from the rest of the web page.
Marquee Tag.
<MARQUEE> </MARQUEE> tags are used to display embedded text to move
vertically/horizontally. This tag is unique to Internet Explorer only.
Syntax :
DIRECTION : “scroll direction” specifies the scrolling direction of the text direction.
Values can be UP/DOWN/LEFT/RIGHT.
HEIGHT & WIDTH: “pixel” renders rectangular space on the page with these
attributes. Default value is determined by the largest font assigned to the content in the
marquee.
BGCOLOR : “color” establishes the color for the rectangular space reserved for the
MARQUEE tag.
LOOP : “number” sets the number of times the text should move. -1 will set it to infinite
loop. Once the set number of times is over the text will come to still position.
SCROLLDELAY : “milli seconds” will assign the dealy for the scroll text. The bigger the
number slower the text is. And smaller number will speed up the scroll text.
<MARQUEE DIRECTION=DOWN>
<FONT SIZE=7 COLOR=LIME><PRE><B>
||
||
||
||
****
**
</B></PRE></FONT><BR/>
</MARQUEE>
<MARQUEE DIRECTION=UP>
<FONT SIZE=7 COLOR=LIME><PRE><B>
**
****
||
||
||
||
</B></PRE></FONT><BR/>
</MARQUEE>
Creating Tables
<TABLE> and </TABLE> tags are used for creating tables. All tags are embedded in between.
If you need to contain several cells in a row, then use several <TD></TD> tags embedded
inside <TR> and </TR>.
Adding Borders
BORDER attribute inside the <TABLE> tag is used for mentioning border. No border by default.
Zero value gives no border. Ex.<TABLE BORDER=2>
<I>Without Cellpadding</I>
<CENTER>
<TABLE BORDER=1 WIDTH=25% ALIGN=CENTER>
<TR>
<TH>NAME</TH>
<TH>AGE</TH>
</TR>
<TR ALIGN=CENTER>
<TD >Shilpa</TD>
<TD >21 </TD>
</TR>
<TR ALIGN=CENTER>
<TD>Vaishali</TD>
<TD>22</TD>
</TR>
</TABLE>
</CENTER>
<HR>
<CENTER>
<TABLE BORDER=1 WIDTH=25% CELLPADDING=10 ALIGN=CENTER>
<TR>
<TH>NAME</TH>
<TH>AGE</TH>
</TR>
<TR ALIGN=CENTER>
<TD >Shilpa</TD>
<TD >21 </TD>
</TR>
<TR ALIGN=CENTER>
<TD>Vaishali</TD>
<TD>22</TD>
</TR>
</TABLE>
</CENTER>
</BODY>
</HTML>
Ex : Cell spacing
<HTML>
<HEAD>
<TITLE>Working With Table</TITLE>
</HEAD>
<BODY BGCOLOR=LIGHTGREY>
<B>Controlling the space between Adjacent Cells ! </B><BR><BR>
<HR>
<I>Without Cellspacing</I>
<CENTER>
<TABLE BORDER=1 WIDTH=25% ALIGN=CENTER>
<TR>
<TH>NAME</TH>
<TH>AGE</TH>
</TR>
<TR ALIGN=CENTER>
<TD >Shilpa</TD>
<TD >21 </TD>
</TR>
<TR ALIGN=CENTER>
<TD>Vaishali</TD>
<TD>22</TD>
</TR>
</TABLE>
</CENTER>
<HR>
<CENTER>
<TABLE BORDER=1 CELLSPACING = 10 WIDTH=25% ALIGN=CENTER>
<TR>
<TH>NAME</TH>
<TH>AGE</TH>
</TR>
<TR ALIGN=CENTER>
<TD >Shilpa</TD>
<TD >21 </TD>
</TR>
<TR ALIGN=CENTER>
<TD>Vaishali</TD>
<TD>22</TD>
</TR>
</TABLE>
</CENTER>
</BODY>
</HTML>
Adding Caption
<CAPTION> and </CAPTION> tags are used to insert a caption for the table.
ALIGN attribute specifies the alignment as LEFT/RIGHT/BOTTOM/TOP.
<HTML>
<HEAD>
<TITLE>Table Attributes</TITLE>
</HEAD>
<BODY BGCOLOR = LIGHTGREY>
<B>Specifing the BORDER and WIDTH of the Table!</B>
<BR><BR><BR><BR>
<CENTER>
<TABLE BORDER=5 WIDTH=50%>
<CAPTION ALIGN=bottom>
<B>Personal Information</B>
</CAPTION>
<TR>
<TH>NAME</TH>
<TH>AGE</TH>
</TR>
<TR ALIGN=CENTER>
<TD >Shilpa</TD>
<TD >21 </TD>
</TR>
<TR ALIGN=CENTER>
<TD>Vaishali</TD>
<TD>22</TD>
</TR>
</TABLE>
</CENTER>
</BODY>
</HTML>
“Align” attribute can be used with <TH> or <TD> tags to align the contents of the cell with
values LEFT/CENTER/RIGHT.
Ex. <TR>
<TH WIDTH =20%>ROLL NO</TH>
<TH WIDTH =20%>FIRST NAME</TH>
<TH WIDTH =20%>LAST NAME</TH>
<TH WIDTH =20%>FEES PAID</TH>
<TR>
Centering a table
Embed the entire table inside <CENTER> and </CENTER> tags to center the table within the
window.
Inserting an Image
Use the image source tag <IMG SRC = URL> tag inside the tags of <TD>, <TH>.
Ex.<TH><IMG SRC=”flowers.jpg”></TH>
Spanning Columns
“COLSPAN” attribute lets you span columns. It contains the value as the number of required
columns to merge. It is embedded inside the first tag of <TH>.
Ex. <TH COLSPAN=4> S T U D E N T R E P O R T</TH>
Spanning Rows
“ROWSPAN” attribute lets you span rows. It contains the value as the number of required
columns to merge. It is embedded inside the first tag of <TH>
Ex. <TH ROWSPAN=2>
<CENTER>
<TABLE BORDER=1 WIDTH=50% ALIGN=CENTER>
<TR>
<TH Bgcolor = LIME>NAME</TH>
<TH Bgcolor = LIME>AGE</TH>
</TR>
<TR ALIGN=CENTER>
<TD Bgcolor = PINK><FONT Color=BLACK>Shilpa</FONT></TD>
<TD Bgcolor = YELLOW><FONT Color=BLACK>21 </FONT></TD>
</TR>
<TR ALIGN=CENTER>
<TD Bgcolor = WHITE><FONT Color=RED>Vaishali</FONT></TD>
<TD Bgcolor = VIOLET><FONT Color=BLACK>22</FONT></TD>
</TR>
<CAPTION ALIGN=bottom><B><BR>
Personal Information</B>
</CAPTION>
</TABLE>
</CENTER>
</BODY>
</HTML>
Frames
<FRAMESET></FRAMESET> tags display frames in a window. Each frame can have its own
HTML file. Frames can be scrolled & resized by the user, unless scrolling and resizing is turned
off.
Absolute dimensions
Ex. <Frameset rows=80,400>
Defines a table with top row 80 pixels and bottom row with 400 pixels.
Percentage dimensions
Use % as dimensions instead of pixel. The % will set in context with the window size.
Ex.<Frameset rows=”80%,20%”>
Top row with 80% of window and bottom with 20% of window is set.
Relative dimensions
Ex.<FRAMESET ROWS=”*,100”>
Bottom row is set to 100 pixel and top row takes the rest of the space in context with the
window.
You cannot use the <body></body> tags together with the <frameset></frameset> tags!
However, if you add a <noframes> tag containing some text for browsers that do not support
frames, you will have to enclose the text in <body></body> tags! See how it is done in the
first example below.
Creating Forms
A form is used to collect data from the users and submit it to the server for further process.
The information may be
(a) Written to a file which is saved on the server.
(b) Submitted to a database for collecting necessary information requested by the user.
(c) E-mailed to someone in particular.
The data validation may be done at the browser level before submitting the data.
The ACTION attribute in the <FORM> tag specifies a URL that indicates specific CGI scripts or
program that collect the form data that a user entered.
Likewise the METHOD attribute describes the way in which the input data is delivered to a
forms-handling program. Values can be POST or GET.
<FORM> </FORM> tags embed all other tags and text inside them. Action for the web server,
and method of dispatch is also mentioned inside these tags itself.
<SELECT> </SELECT>
This tag works like lists. Its attributes are
(a) NAME=”text” Provides the name of the component.
(b) SIZE=”number” Controls the number of elements. You can define more elements
than mentioned here.
(c) MULTIPLE: indicates that multiple selections are possible in absence of this attribute
the user can make only one selection.
Ex. <SELECT NAME=BANKS SIZE=4>
<OPTION>HIMALAYAN BANK
<OPTION>STANDARD CHARTERED BANK
<OPTION>NABIL BANK
<OPTION>SBI NEPAL
<OPTION>GLOBAL TRUST BANK
</SELECT>
<TEXTAREA> … </TEXTAREA>
This tag allows you to create a text area without size. Text is embedded between the tags.
Attributes are : -
(a) NAME=”text” Provides the name for controlling the component.
(b) ROWS=”number” specified the no of lines on the screen to display.
(c) COLS=”number” specified the no of columns on the screen for display.
(d) WRAP=HARD/SOFT/NONE specifies how text will wrap.
You can include more text than specified in the rows and columns.
Ex. <TEXTAREA NAME=”REMARKS” ROWS=3 COLS 4>
THIS STUDENT IS JOINING Masters in information technology.
</TEXTAREA>
<HTML><HEAD><TITLE>log on form</TITLE>
</HEAD>
<BODY>
<FORM>
<TABLE align=center border=2>
<TR>
<TH align=CETNER colSpan=2>Log On Form</TH></TR>
<TR>
<TD>UserName</TD>
<TD><INPUT name=txt></TD></TR>
<TR>
<TD>Password</TD>
<TD><INPUT type=password name=txt password></TD></TR>
<TR>
<TD>Log On as</TD>
<TD><SELECT name=cbologonas> <OPTION value=administrator
selected>Administrator</OPTION> <OPTION
value=operator>Operator</OPTION></SELECT> </TD></TR>
<TR>
<TD align=CENTER colSpan=2><INPUT type=button value=ok name=btnok> <INPUT
type=button value=cancel
name=btncancel></TD></TR></TBODY></TABLE></FORM></BODY></HTML>
Multi-column text
<MULTICOL> and </MULTICOL> displays text in multiple columns
Working of Internet
GET
It’s a request method which packs the information from the browser at the end of the URL
string. QUERY_STRING is the environment variable carrying the pair of element and value.
POST
Post also passes the information from browser in the same way. But POST uses STDIN.
Standard Input stream. CONTENT_LENGTH contains the size of the stream. Post method
variable and values are not seen in the URL. There is no restriction on the size of the data
sent to the server.
To evaluate the data the server should examine the “REQUEST_METHOD” value and use
the information accordingly.