if-notes

163
 World Institute Of Technology 8km milestone ,Sohna Palwal Road , NH!" # ,Sohna , $urgaon ,Haryana% We&site ' www%wit%net%in (mail ' info)wit%net %in CSE-208 F Internet Fundamentals Class Work: 50 . NOTE: For setting up the question paper, question no 1 will be set up from all the four sections which will be compulsory and of short answer type. Two questions will be set from each of the four sections. The students have to attempt first common question, which is compulsory, and one question from each of the four sections. Thus students will have to attempt 5 questions out of 9 questions. Section A: Electronic Mail and Internet: Introduction, advantages and disadvantages, Userids, Pass words, e-mail addresses, message components, message composition, mailer features, E-mail inner workings, E-mail management, Mime types, Newsgroups, mailing lists, chat rooms. Introduction to networks and internet, history, Working of Internet, Internet Congestion, internet culture, business culture on internet. Collaborative computing & the internet. Modes of Connecting to Internet, Internet Service Providers(ISPs), Internet address, standard address, domain name, DNS, IP.v6.Modems and time continuum, communications software; internet tools. Section B: World Wide Web : Introduction, Miscellaneous Web Browser details, searching the www: Directories search engines and meta search engines, search fundamentals, search strategies, working of the search engines, Telnet and FTP. Introduction to Browser, Coast-to-coast surfing, hypertext markup language, Web page installation, Web page setup, Basics of HTML & formatting and hyperlink creation. Using FrontPage Express, Plug-ins. Section C: Languages : Basic and advanced HTML, java script language, Client and Server Side Programming in java script. Forms and data in java script, XML basics. Introduction to Web Servers: PWS, IIS, Apache; Microsoft Personal Web Server. Accessin g & using these servers. Section D: Privacy and security topics : Introduction, Software Complexity, Encryption schemes, Secure Web document, Digital Signatures, Firewalls. Text Book:  Fundamentals of the Internet and the World Wide Web, Raymond Greenlaw and Ellen Hepp – 2001, TMH  Internet & World Wide Programming, Deitel,Deitel & Nieto, 2000, Pearson Education

Upload: ruchisinghnov

Post on 04-Jun-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 1/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

CSE-208 F Internet FundamentalsClass Work: 50.NOTE: For setting up the question paper, question no 1 will be set up from all the foursections which will be compulsory and of short answer type. Two questions will be set fromeach of the four sections. The students have to attempt first common question, which iscompulsory, and one question from each of the four sections. Thus students will have toattempt 5 questions out of 9 questions.

Section A: Electronic Mail and Internet:Introduction, advantages and disadvantages, Userids, Pass words, e-mail addresses, messagecomponents, message composition, mailer features, E-mail inner workings, E-mail management,Mime types, Newsgroups, mailing lists, chat rooms. Introduction to networks and internet,history, Working of Internet, Internet Congestion, internet culture, business culture on internet.Collaborative computing & the internet. Modes of Connecting to Internet, Internet ServiceProviders(ISPs), Internet address, standard address, domain name, DNS, IP.v6.Modems and timecontinuum, communications software; internet tools.

Section B: World Wide Web :Introduction, Miscellaneous Web Browser details, searching the www: Directories searchengines and meta search engines, search fundamentals, search strategies, working of the searchengines, Telnet and FTP. Introduction to Browser, Coast-to-coast surfing, hypertext markuplanguage, Web page installation, Web page setup, Basics of HTML & formatting and hyperlinkcreation. Using FrontPage Express, Plug-ins.

Section C: Languages :Basic and advanced HTML, java script language, Client and Server Side Programming in javascript. Forms and data in java script, XML basics. Introduction to Web Servers: PWS, IIS,Apache; Microsoft Personal Web Server. Accessing & using these servers.

Section D: Privacy and security topics :Introduction, Software Complexity, Encryption schemes, Secure Web document, DigitalSignatures, Firewalls.

Text Book: Fundamentals of the Internet and the World Wide Web, Raymond Greenlaw and Ellen

Hepp – 2001, TMH Internet & World Wide Programming, Deitel,Deitel & Nieto, 2000, Pearson Education

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 2/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Reference Books: Complete idiots guide to java script,. Aron Weiss, QUE, 1997 Network firewalls, Kironjeet syan -New Rider Pub. www.secinf.com www.hackers.com Alfred Glkossbrenner-Internet 101 Computing MGH, 1996

Section A: Electronic Mail and Internet

Email

Electronic mail (also known as email or e-mail) is one of the most commonly used serviceson the Internet, allowing people to send messages to one or more recipients. Email was inventedby Ray Tomlinson in 1972.

It is a system used for creating, sending and storing textual data in digital form over anetwork. Earlier, the e-mail system was based on Simple Mail Transfer Protocol (SMTP)mechanism, a protocol used for sending e-mails from one server to another. Today's e-mailtechnology uses the store-and-forward model. In this model, the user sends and receivesinformation on their own computer terminal. However, the computer is used only for connectingto the e-mail architecture. The creation, transmission and storage of e-mail takes place, onlywhen the connection with this e-mail architecture is established.

E-mail is one of the many technological developments that have influenced our lives. It haschanged the medium of communication. So, it becomes necessary for us to have a look at thebenefits and harmful effects of this popular mailing tool.

General Description of Electronic MailElectronic mail, email, is a computer based method of sending messages from one computer

user to another. These messages usually consist of individual pieces of text which you can sendto another computer user even if the other user is not logged in (i.e. using the computer) at thetime you send your message. The message can then be read at a later time. This procedure isanalogous to sending and receiving a letter.

Originally, email messages were restricted to simple text, but now many systems canhandle more complicated formats, such as graphics and word processed documents.When mail is received on a computer system, it is usually stored in an electronic mailbox for therecipient to read later. Electronic mailboxes are usually special files on a computer which can beaccessed using various commands. Each user normally has their individual mailbox.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 3/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

It is straightforward to send electronic mail between users of different computer systems which areconnected to major networks. Most major academic and research institutions and companiesthroughout the world can now be reached by electronic mail. In addition, a growing number ofindividuals can be contacted in this way. In the UK, most academic and research institutions are linkedby a network called JANET (or SuperJANET). This is effectively part of the Internet, so emailcan be exchanged with most national and international networks.

Email Facilities All email systems have the ability to send, receive and discard mail. Most systems have

facilities for storing mail which is to be kept rather than discarded. It is important to discard mailwhich does not need to be kept, as it uses storage space on disks. Mailboxes can soon accumulatea large number of mail messages making it difficult to read and process new mail, in addition towasting disk space.

There is almost always a connection between the email system and the computer's standardfile system which allows mail to be read from files or written to files. This enables greaterflexibility in how the mail system is used. For example, a mail message may be prepared in anormal file using a familiar text editor and then sent by the email system. Sections of other filesmay be included in the mail message as well.

Most systems have a reply facility, although some of these do not always work as expected.Care should be taken when using this facility in electronic mail, as replies do not always go backto the sender.

Advantages of EmailThe benefits of e-mail are huge in number.

Easy to use: E-mail frees us from the tedious task of managing data for daily use. It helps usmanage our contacts, send mails quickly, maintain our mail history, store the requiredinformation, etc.Speed: An e-mail is delivered instantly and anywhere across the globe. No other service matchesthe e-mail in terms of speed.Easy to prioritize: Because e-mails come with a subject line, it is easy to prioritize them andignore the unwanted ones.Reliable and secure: Constant efforts are being taken to improve the security in electronicmails. It makes e-mail one of the secured ways of communication.Informal and conversational: The language used in e-mails is generally simple and thus, makesthe process of communication informal. Sending and receiving e-mails takes less time, so it canbe used as a tool for interaction.Easier for reference: When a person needs to reply to a mail, he/she can use the provision ofattaching previous mails as references. It helps refresh the recipient's know-how on what he isreading.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 4/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Automated e-mails: It is possible to send automated e-mails using special programslike autoresponders . The autoresponders reply only to those messages with generalized, pre-written text messages.Environment friendly: Postal mails use paper as a medium to send letters. Electronic mailtherefore, prevents a large number of trees from getting axed. It also saves the fuel needed fortransportation.Use of graphics: Colorful greeting cards and interesting pictures can be sent through e-mails.This adds value to the e-mail service.

Advertising tool : Nowadays, many individuals and companies are using the e-mail service toadvertise their products, services, etc.Info at your fingertips: Storing data online means less large, space taking file cabinets, foldersand shelves. You can access information far quicker if you learn how to use email this way.Leverage: Send the same message to any number of people. Adaptations are simple, too. If youhave a product or service to sell, email is an effective medium to get your message out.Send reminders to yourself. Do you use more than one account? Email yourself messages fromwork to home or vice versa.

Disadvantages of EmailThe e-mail service, though beneficial in our day-to-day life, has got its own drawbacks that areoff late coming to the fore.

Viruses: These are computer programs which have the potential to harm a computer system.These programs copy themselves and further infect the computer. The recipient needs to scan themails since; viruses are transmitted through them and have the potential to harm computersystems.Spam: E-mails when used to send unsolicited messages and unwanted advertisements createnuisance and are termed as Spam. Checking and deleting these unwanted mails can unnecessarilyconsume a lot of time. It has therefore, become necessary to block or filter unwanted e-mails bymeans of spam filters. Spamming is practiced by sending hoax e-mails. E-mail spoofing isanother common practice, used for spamming. The act of spoofing involves deceiving therecipient by altering e-mail headers or addresses from which the mail is sent.Hacking: The act of breaking into computer security is termed as hacking. In this form ofsecurity breach, e-mails are intercepted by hackers. An e-mail before being delivered to therecipient, "bounces" between servers located in different parts of the world; hence, it can behacked by a professional hacker.Misinterpretation: One has to be careful while posting content through an e-mail. If typed in ahurry, the matter could be misinterpreted.Lengthy mails: If the mail is too long and not properly presented, the reader may lose interest inreading it.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 5/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Not suitable for business: Since the content posted via e-mails is considered informal, there is achance of business documents going unnoticed. Thus, urgent transactions and especially thoserequiring signatures are not managed through e-mails.Crowded inbox: Over a period of time, the e-mail inbox may get crowded with mails. Itbecomes difficult for users to manage such a huge chunk of mails.Need to check the inbox regularly: In order to stay updated, one has to check his e-mailaccount regularly.Lacks the personal touch: Some things are best left untyped. Email will never beat a handwritten card or letter when it comes to relationships.

Every new technology enters the social world with its share of benefits and drawbacks.Different people interpret and utilize it in different ways. In order to make the most of theavailable technology, users should try to understand both, the positive and negative sides of thetool they use. No technology can be deemed totally perfect!

How email works (MTA, MDA, MUA)Email, as simple as it is to use, relies on a more complicated set of operating procedures

than that of the Web. For most users, its operation is transparent, which means that it is notnecessary to understand how email works in order to be able to use it.

However, the short introduction below has been provided to help users understand its basicprinciples, give them an idea of how to best configure their email clients and inform them aboutthe underlying mechanisms of spam.

Email is based around the use of electronic mailboxes. When an email is sent, the messageis routed from server to server, all the way to the recipient's email server. More precisely, themessage is sent to the mail server tasked with transporting emails (called the MTA , for MailTransport Agent ) to the recipient's MTA. On the Internet, MTAs communicate with one anotherusing the protocol SMTP, and so are logically called SMTP servers (or sometimes outgoingmail servers ).

The recipient's MTA then delivers the email to the incoming mail server (called the MDA ,for Mail Delivery Agent ), which stores the email as it waits for the user to accept it. There aretwo main protocols used for retrieving email on an MDA:

POP3 ( Post Office Protocol ), the older of the two, which is used for retrieving email and, incertain cases, leaving a copy of it on the server.

IMAP ( Internet Message Access Protocol ), which is used for coordinating the status ofemails (read, deleted, moved) across multiple email clients. With IMAP, a copy of everymessage is saved on the server, so that this synchronization task can be completed.

For this reason, incoming mail servers are called POP servers or IMAP servers ,depending on which protocol is used.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 6/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

To use a real-world analogy, MTAs act as the post office (the sorting area and mail carrier,which handle message transportation), while MDAs act as mailboxes, which store messages (asmuch as their volume will allow) until the recipients check the box. This means that it is notnecessary for recipients to be connected in order for them to be sent email.

To keep everyone from checking other users' emails, MDA is protected by a user namecalled a login and by a password .Retrieving mail is done using a software program called an MUA ( Mail User Agent ). When

the MUA is a program installed on the user's system, it is called an email client (such as MozillaThunderbird, Microsoft Outlook, Eudora Mail, or Lotus Notes). When it is a web interface usedfor interacting with the incoming mail server, it is called webmail .

Using emailAn email client, a software program for writing, checking and sending email, is generally

made up of a number of windows. The main windows of this software are:• Incoming, In, Inbox: This represents the main mailbox for receiving email,

• Sent, Outbox, Out: These are copies of messages that you have sent.• Deleted, Trash: The trash bin containing deleted emails. When emails are shown in thetrash, you can still retrieve them. To permanently delete them, you will need empty the trashbin.

• Folders: Most clients can be used to file emails in folders, much like folders on a hard drive.

Email fieldsHere are the meanings of the fields to be filled in when you send an email:

• From: this is your email address; most of the time you will not have to fill in this field,because it is generally set by the email client according to your preferences.

• To: This field is used for the recipient's email address.• Subject: this is the title that your recipients will see when they want to read the email• Cc (carbon copy): this allows an email to be send to a large number of people by writing their

respective addresses separated by commas

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 7/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

• Bcc (blind carbon copy): This is a Cc, except that the recipient does not see the list of peoplein the Bcc field

• Message: This is the body of your message

The Carbon Copy function sends a copy to people not directly involved with the messagebut whom you wish to keep up to date with the message contents or show that you sent the emailto the recipient(s).

The Blind Carbon Copy function makes it possible to forward messages without any of therecipients or even the hidden recipients seeing that the message is being forwarded to them. It isgenerally recommended when sending an email to many people to forward it using Blind copy soas to prevent one of the recipients from replying to everyone or assembling a list of addresses.

Other email functions are:• Attached Files, Attachments: A file can be attached to an email by specifying its location on

the hard drive.• Signature: If the email client allows it, you are often able to set a signature, meaning a few

lines of text which will be added to the end of the document.

Userid and PasswordA computer system uses userids and passwords together to grant access to the system. You

need the correct combination of userid and password, to access your account.

UseridThe userid identifies you to the computer. Userids are typically some form of your name. (Your

last name, for example). A userid must be unique throughout the computer system. This allowsthe computer to distinguish between you and some other person. One confusing issue is thatdifferent systems refer to a userid (the thing that identifies you to the computer) with differentnames. Some that you may run across are:Login IDUsernameUseridBut, they all refer to that special name that identifies you to that particular computer system.

Your userid is also used for communication with other people through electronic mail.Since the userid identifies you to the computer, it is natural for it to be used to identify you toother computer systems. For example: The person Joe B. User could have this userid, "jbu3470".

The userid is made up of the person's initials and the digits of some personal identificationnumber.

Password

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 8/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

To prevent other people from using your account via your userid, you are required to havea password. A password allows you and only you to access the computer system through youruserid. It basically proves to the computer system that you are who you say you are. So it shouldbe obvious that you DO NOT GIVE YOUR PASSWORD TO ANYONE!!!

User ID and Password RulesPlease review the User ID and Password guidelines below before selecting a User ID or selectingor changing your Password.

User ID: User IDs must be 7-14 charactersUser IDs must contain at least one letter; numbers are allowed, but not requiredUser IDs cannot contain spacesUser IDs cannot contain your Social Security Number, Tax Identification Number, or CustomerAccess NumberNo special characters are allowed, such as: ! @ # $ % ^ &Use of an underscore is allowed but not required: _Do not use your Password as your User ID

Password: Passwords must be 7-14 charactersPasswords must include at least one letter and one numberPasswords cannot contain spacesSemicolons cannot be part of a PasswordPasswords are case-sensitiveDo not use your User ID as your PasswordIf you forget your User ID or Password, you can retrieve them through the "User ID & PasswordHelp" link.

Note: You cannot change your User ID once it is established.

What to do with a messageThere are many operations that can be performed on emails:• New, Compose, Write: Write a new message• Erase, Delete, Remove: Erase a message• Store, Save, Backup, Drafts: Copy a message into a safer place• Print: Print a message• Reply: Send a reply message to the sender (sometimes including their own message in the

body of the document, with each line proceeded by the symbol ">" and "Re:" followed by

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 9/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

their chosen subject as the title, to show that it is a reply. The Reply All button makes itpossible to send a reply to the sender as well as everyone else who had been put as a recipientor on copy.

• Forward: Forwards the message to someone else, letting them know that the message comesfrom you. The subject is generally preceded by Fwd: to indicate that it is a forwardedmessage.

• Redirect, Transmit: Forward a message to someone, letting them know where it originallycame from. The subject is generally preceded by Fwd: to indicate that it is a forwardedmessage.

Email addressesElectronic mail must be addressed properly, in much the same way as a normal letter needs

to be addressed, in order that it can reach its intended recipient. However, with electronic mailthe addressing has to be slightly different and must be more precise than a conventional mailaddress.

Most email uses is addressed using internet addresses. These are supported by what isknown as the Domain Name Server (DNS). This is an internationally distributed naming schemeand the components of each address are structured in a hierarchical manner. These start with themailname of the person, followed by various address components, ending with the "Top level"domain (often a country code). In this respect, the addressing is in the same order as that of aconventional letter.

Email addresses (both for senders and recipients) are two strings separated by the character"@" (the "at sign"): user@domain

The right-hand part describes the domain name involved, and the left-hand part refers to theuser who belongs to that domain. One or more mail servers correspond to each domain.An email address can be up to 255 characters long and can include the following characters:• Lowercase letters from a to z;• Digits• The characters ".","_" and "-" (full stop, underscore, and hyphen)In practice, an email address often looks something like this:[email protected]

For [email protected]

The mailname comes first, indicating who the email is for. The "@" sign separates themailname from the site. The next components indicate details of the system to which the email issent.bham = Birminghamac = academic

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 10/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

uk = Great BritainThe final component ("top level" domain) is normally the ISO3166 standard two letter

country code. There are, however, two main types of exception. One is Great Britain (gb) whichuses "uk". The other exceptions are mainly some of American domains (eg edu, mil, gov). Theseare at the same "level" in the naming scheme as countries.

Addresses of this form are also known as rfc822 addresses, because that is the name of theInternet standard in which the addresses were originally described.

Partially qualified addresses Some systems will allow the address to be specified in an incomplete form. For example,

[email protected] be expressed asE.V.Nebor@bham

This is known as a partially qualified address. The use of these names is NOTRECOMMENDED, as they are not universally recognized and are a cause of many errors andmuch confusion. The full address should always be used.

Message Components

HeaderThe header of an e-mail address is where all the important addressing information is kept,

along with data about the message itself. The following table describes the elements that makeup the header of an e-mail.

To The TO Field is where the email address of the messages recipient is entered.

Subject The subject is essentially a title, or a very short summary, of an e-mail. Ideally itshould contain some sort of reference to the emails content

CC

BCC

To Carbon Copy (CC) a message to someone is to send them a copy of the e-mail,even though they are not the e-mail’s intended recipient. This is a common practice inbusiness communications, where many people in an organization often need to bemade aware of certain communications, even if they are not actively involved in theconversation.BCC stands for Blind Carbon Copy . Any people included in the BCC recipient listof an e-mail receive a copy of the message, but their name is not included in themessage headers, and no one else who received the message knows that they were senta copy.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 11/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

BodyThe body of the message is, of course, the most important part. Everything you need to say

is entered here, and this is what the recipient will be reading.

Message CompositionSteps are:

• Launching your e-mail program is usually as simple as clicking on the e-mail icon onyour desktop. Once the program is open, write a message by clicking on the ComposeMail, New Message or similar button.

• In the new message window, type the e-mail addresses of the recipients in the To field,or use the A ddress book to select one or more of the addresses.

• In the CC field, enter the address of anyone you want to receive a copy of the message.Type the e-mail address or choose it from the address book.

• Type the subject of the message.• Now type your message.• Finally, click on the Send button.

Mailer FeaturesMost mailers provide common features which provide functionality for manipulating your

mail box contents, composing messages and saving messages to the disk. The features are:

Compose, File and ReplyA Compose button provides following features :

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 12/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

• New – Compose a message from scratch.• Reply – Reply to the current message.• Forward – Pass the message on.• Vacation – You are going away and want automatic responses to be generated, and have

email saved.A File button has the following functionality:

• Save – Save the current message into a file on disk.• Insert – Include a file in the body of the message being composed.• Exit – Leave the mailer.• Open – Open a file from the disk.• Attach – Append a file to a message.

A Reply button consists of following items:• To sender.• To all• Forward• Include• Include bracketed.

E-mail Inner Working If we split the mailing of a letter into three phases:

• In phase one, the steps needed to perform are compose, address, package, stamp anddeposit the letter in a suitable place for pick up.

• In phase two, a mail person, on a fixed schedule, retrieves the letter from its place ofdeposit. Then the letter, if correctly addressed and with the proper postage, is routed to itsfinal destination mailbox.

• In phase three, the recipient check for mail, retrieves the letter from the mailbox, opensthe envelope, reads the mail, and perhaps files it away.

Similar phases need to be carried out in the electronic setting:• Mailer, Mail Server, and Mailbox – Three mail components are necessary for the email

system to work.• Mailers A mailer is also called a mail program, mail application, or mail client. A mailer

is the software that allows you to manage, read, and compose email.• Mail Servers The mail server is a computer whose function is to receive, store and deliver

email.• Mailboxes An electronic mailbox is a disk file specifically formatted to hold email

messages and information about them,.There are several different ways in which users typically obtain their emails.• Store and Forward Features

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 13/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

• Central Mail Spool and IMAP• Bounce Feature

E-mail ManagementEmail is now the de facto standard for business communication across organizations at this

time. Recent research shows the extensive use of emails in business and its projected growth inthe future presents major information management challenges and risks for many organizations.Just as any type of business information and record, email must be included as part of, andadhered to the organizational standards addressing information and records:

• Capture• Classification• Storage• Preservation• Management• Destruction

The vast quantities of emails held in inboxes, sent folders, and deleted item folders put theorganization at risk and adversely impact the performance of email servers in the organizations.Email servers were never designed to act as repositories for such great quantities of emails andmove control of this information away from the organization. Without the management ofemails, it is difficult for organizations to meet their legal preservation requirements in the eventof litigation and government investigations, increasing the effort and cost in responding to e-discovery and disclosure.

Email management systems centrally capture emails created and received by employees.Using a classification scheme to manage this content, retention periods and access controls canbe applied to manage emails. Metadata associated with the emails can be captured to allow thisinformation to be managed and retrieved. Email active archiving is one of the most commonapplications for email management. At their most basic, these solutions either copy or removemessages from the messaging application and some it at another location. Some approaches copyall messages coming into and out of the messaging application in real time, while others willphysically remove the messages from the message store. In some of these solutions, themessages are not archived, but attachments are and are replaced with either a stub or an outrightlink within the message.

These email management systems, while attractive and effective, are merely part of anoverall solution. Organizations need to have records management programs, consisting oforganization-wide policies and procedures, staff and activities, in which these computerapplications can be successfully utilized.Here are four simple email management rules to help you keep control of your inbox:• Let your email program manage your email as much as possible.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 14/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Email management starts with setting up and using filters. If you're using an email programsuch as Outlook, you can configure email rules to send your spam directly to the trash -meaning that you don't waste your time reading and deleting it.

• Do not check your email on demand.You don't need to see every piece of email the second it arrives. If you're using an emailprogram that announces the arrival of new email, turn off the program's announcementfeatures, such as making a sound or having a pop-up screen announce the arrival of email.Checking email on demand can seriously interfere with whatever other tasks you're trying toaccomplish because most people will read email when they check it.

• Don't read and answer your email all day long.You may get anywhere from a handful to hundreds of emails each day that need to beanswered, but they don't need to be answered immediately, interrupting whatever else you'redoing. Instead, set aside a particular time each day to review and answer your email.Schedule the hour or whatever time it takes you to answer the volume of email you get, andstick to that schedule as regularly as possible.

• Don't answer your email at your most productive time of day.For me, (and for many others, I suspect), my most productive work time is the morning. If Istart my work day by answering my email, I lose the time that I'm at my most creative. If I'mwriting a piece, for instance, it takes me twice as long to compose it in the afternoon orevening than it would in the morning, when I feel fresh and alert.

Answering email, on the other hand, isn't usually a task that calls for a great deal ofcreativity. So by ignoring my email until the late afternoon, and answering it then, I get the dualbenefit of saving my most productive time for other more demanding tasks, and not continuallyinterrupting whatever other tasks I'm trying to accomplish.

MIME (Multipurpose Internet Mail Extensions)MIME is a standard which was proposed by Bell Communications in 1991 in order to

expand upon the limited capabilities of email, and in particular to allow documents (such asimages, sound, and text) to be inserted in a message. It was originally defined by RFCs 1341 and1342 in June 1992.Using headers, MIME describes the type of message content and the encoding used.MIME adds the following features to email service:

• Be able to send multiple attachments with a single message;• Unlimited message length;• Use of character sets other than ASCII code;• Use of rich text (layouts, fonts, colours, etc)• Binary attachments (executables, images, audio or video files, etc.), which may be divided if

needed.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 15/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

MIME uses special header directives to describe the format used in a message body, so thatthe email client can interpret it correctly.

Common MIME Types are listed in the table below:Type Subtype Description of Content Type File Extensions

Application PostscriptTextroff

Printable postscript documentTEX documentPrintable troff document

.eps, .ps

.tex

.t, .tr, .roffAudio Aiff

AuMidiRealaudiowav

Apple soundSun Microsystems soundMusical Instrument Digital InterfaceProgressive Networks soundMicrosoft sound

.aif, .aiff,.aifc

.au, .snd

.midi, .mid

.ra, .ram

.wavImage Gif

JpegPngTiff

Graphics Interchange FormatJoint Photographic Experts GroupPortable Network GraphicsTagged Image File Format

.gif

.jpeg,.jpg,.jpe

.png

.tiff, .tifModel Vrml Virtual Reality Modeling Language .wrlText Html

PlainSgml

Hypertext Markup LanguageUnformatted textStandard Generalized MarkupLanguage

.html, .htm

.txt

.sgml

Video AviMpegQuicktimeSgi-movie

Microsoft Audio Video InterleavedMoving Picture Experts GroupApple QuickTime movieSilicon Graphics movie

.avi

.mpeg, .mpg

.qt, .mov

.movie

News GroupsA newsgroup is a continuous public discussion about a particular topic. You can join a

newsgroup at any time to become part of a huge conversation between hundreds or eventhousands of people

A newsgroup is a discussion about a particular subject consisting of notes written to acentral Internet site and redistributed through Usenet, a worldwide network of news discussiongroups. Usenet uses the Network News Transfer Protocol (NNTP).

Newsgroups are organized into subject hierarchies, with the first few letters of thenewsgroup name indicating the major subject category and sub-categories represented by asubtopic name. Many subjects have multiple levels of subtopics. Newsgroups are divided into

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 16/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

categories. The categories help to determine what kind of group and what kind of postings youwill find there. Some major subject categories are:

• news,• rec (recreation),• soc (society),• sci (science),• comp (computers), and so forth (there are many more).• Alt• talk

Use of Newsgroups We can use newsgroups for various purposes, for example:• Newsgroups are an excellent way to find out web sites to visit in your particular area of

interest or just pick up detailed information about area of interest.• You can buy and sell stuff. People often advertise things for sale in some newsgroup.

Users can post to existing newsgroups, respond to previous posts, and create newnewsgroups.

Newcomers to newsgroups are requested to learn basic Usenet netiquette and to getfamiliar with a newsgroup before posting to it. A frequently-asked questions is provided. Therules can be found when you start to enter the Usenet through your browser or an online service.You can subscribe to the postings on a particular newsgroup.

Some newsgroups are moderated by a designated person who decides which postings toallow or to remove. Most newsgroups are unmoderated.

Mailing ListsA mailing list is a collection of names and addresses used by an individual or an

organization to send material to multiple recipients. The term is often extended to include thepeople subscribed to such a list, so the group of subscribers is referred to as "the mailing list", orsimply "the list".

Types of mailing listsAt least two types of mailing lists can be defined:

An announcement list is closer to the original sense, where a "mailing list" of people wasused as a recipient for newsletters, periodicals or advertising. Traditionally this was done throughthe postal system.

With the rise of email, the electronic mailing list became popular. The second type allowsmembers to post their own items which are broadcast to all of the other mailing list members.This second category is usually known as a discussion list.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 17/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

More definitionsWhen similar or identical material is sent out to all subscribers on a mailing list, it is often

referred to as a mailshot or a blast. A list for such use can also be referred to as a distribution list.In legitimate (non-spam) mailing lists, individuals can subscribe or unsubscribe

themselves.Mailing lists are often rented or sold. If rented, the renter agrees to use the mailing list for

only contractually agreed-upon times. The mailing list owner typically enforces this by "salting"(known as "seeding" in direct mail) the mailing list with fake addresses and creating new saltsfor each time the list is rented. Unscrupulous renters may attempt to bypass salts by rentingseveral lists and merging them to find the common, valid addresses.

Mailing list brokers exist to help organizations rent their lists. For some organizations, suchas specialized niche publications or charitable groups, their lists may be some of their mostvaluable assets, and mailing list brokers help them maximize the value of their lists.

A mailing list is simply a list of e-mail addresses of people that are interested in the samesubject, are members of the same work group, or who are taking class together. When a memberof the list sends a note to the group's special address, the e-mail is broadcast to all of themembers of the list. The key advantage of a mailing list over things such as web-baseddiscussion is that as new message becomes available they are immediately delivered to theparticipants’ mailboxes.

Chat RoomsA chat room is a Web site, part of a Web site, or part of an online service such as America

Online, that provides a venue for communities of users with a common interest to communicatein real time. Forums and discussion groups, in comparison, allow users to post messages butdon't have the capacity for interactive messaging. Most chat rooms don't require users to haveany special software; those that do, such as Internet Relay Chat (IRC) allow users to download itfrom the Internet.

Chat room users register for the chat room of their choice, choose a user name andpassword, and log into a particular room (most sites have multiple chat rooms). Inside the chatroom, generally there is a list of the people currently online, who also are alerted that anotherperson has entered the chat room. To chat, users type a message into a text box. The message isalmost immediately visible in the larger communal message area and other users respond. Userscan enter chat rooms and read messages without sending any, a practice known as lurking.

Because chat room messages are spontaneous and instantly visible, there is a potential forabuse, which may or may not be intentional. Site hosts typically post a frequently askedquestions (FAQ) list to guide users to appropriate chat room behavior, such as introducingyourself when you enter a room, making it clear when you are directing a question or response toa specific user, and reporting disruptive users, for example. Disruptive users may verbally abuse

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 18/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

other chatters, monopolize the conversation, or even just disable it by repeatedly typing the sameword or phrase into the conversation, a practice (much frowned upon) known as scrolling.

Chat rooms can be found that focus on virtually any aspect of human endeavor or interest:there are current communities based on classic movies, Irish ancestry, baton twirling, andpsychic readings, for example. Various sites, such as Yahoo, provide a directory of chat sites.Others, such as MSN Web Communities, guide users through the steps required to create theirown chat room.

Introduction to Networks and InternetWhen we communicate, we are sharing information. This sharing can be local or remote.

Between individuals, local communication usually occurs face to face, while remotecommunication takes place over distance. The term “tele-communication”, which includestelephony, telegraphy, and television, means communication at a distance. Data communicationsare exchange of data between two devices via some transmission medium such as a copper wire.

A data communication system has five components:• Message: The message is the information to be communicated. A popular form of

information includes text, numbers, pictures, audio and video.• Sender: The sender is the device that sends the data message. It can be a computer,

workstation, telephone handset, video camera, and so on.• Receiver: The receiver is the device that receives the message. It can be a computer,

workstation, telephone handset, television, and so on.• Transmission Medium: The transmission medium is the physical path by which a

message travels from sender to receiver. Some examples of transmission media includetwisted-pair wire, coaxial cable, fibre-optic cable, and radio waves.

• Protocol: A protocol is a set of rules that governs data communications. It represents anagreement between the communication devices. Without a protocol, two devices may beconnected but not communicating.

A computer network is a group of two or more computers connected to each electronically.This means that the computers can "talk" to each other and that every computer in the networkcan send information to the others. The computers in a network are autonomous in nature, thatmeans computers are independent or self governing. Usually, this means that the speed of theconnection is fast - faster than a normal connection to the Internet. A computer network allowssharing of resources and information among interconnected devices.

Types of Computer NetworksComputer network design can range from simple to very complex. Networking can be as

simple as connecting two computers, or a computer and a printer, while more complex networks

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 19/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

can involve the connection of millions of computers and devices. Below is a brief outline ofdifferent computer network types.

Local area networkA local area network (LAN) is a network that connects computers and devices in a limited

geographical area such as home, school, computer laboratory, office building, or closelypositioned group of buildings. Each computer or device on the network is a node. Current wiredLANs are most likely to be based on Ethernet technology, although new standards like ITU-T also provide a way to create a wired LAN using existing home wires (coaxial cables, phonelines and power lines).

The defining characteristics of LANs, in contrast to WANs (Wide Area Networks), includetheir higher data transfer rates, smaller geographic range, and no need for leasedtelecommunication lines. Current Ethernet or other IEEE 802.3 LAN technologies operate atspeeds up to 10 Gbit/s.

Personal area networkA personal area network (PAN) is a computer network used for communication among

computer and different information technological devices close to one person. Some examples ofdevices that are used in a PAN are personal computers, printers, fax machines, telephones,PDAs, scanners, and even video game consoles. A PAN may include wired and wireless devices.The reach of a PAN typically extends to 10 meters. A wired PAN is usually constructed withUSB and Firewire connections while technologies such as Bluetooth and infraredcommunication typically form a wireless PAN.

Home area networkA home area network (HAN) is a residential LAN which is used for communication

between digital devices typically deployed in the home, usually a small number of personalcomputers and accessories, such as printers and mobile computing devices. An importantfunction is the sharing of Internet access, often a broadband service through a CATV or DigitalSubscriber Line (DSL) provider. It can also be referred to as an office area network (OAN).

Wide area networkA wide area network (WAN) is a computer network that covers a large geographic area

such as a city, country, or spans even intercontinental distances, using a communications channelthat combines many types of media such as telephone lines, cables, and air waves. A WAN oftenuses transmission facilities provided by common carriers, such as telephone companies. WANtechnologies generally function at the lower three layers of the OSI reference model: the physicallayer, the data link layer, and the network layer.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 20/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Campus networkA campus network is a computer network made up of an interconnection of local area

networks (LAN's) within a limited geographical area. The networking equipments (switches,routers) and transmission media (optical fiber, copper plant, etc.) are almost entirely owned (bythe campus tenant / owner: an enterprise, university, government etc.).

In the case of a university campus-based campus network, the network is likely to link avariety of campus buildings including; academic departments, the university library and studentresidence halls.

Metropolitan area networkA Metropolitan area network is a large computer network that usually spans a city or a

large campus.

Enterprise private networkAn enterprise private network is a network build by an enterprise to interconnect various

company sites, e.g., production sites, head offices, remote offices, shops, in order to sharecomputer resources.

Virtual private networkA virtual private network (VPN) is a computer network in which some of the links between

nodes are carried by open connections or virtual circuits in some larger network (e.g., theInternet) instead of by physical wires. The data link layer protocols of the virtual network aresaid to be tunneled through the larger network when this is the case. One common application issecure communications through the public Internet, but a VPN need not have explicit securityfeatures, such as authentication or content encryption. VPNs, for example, can be used toseparate the traffic of different user communities over an underlying network with strongsecurity features.

VPN may have best-effort performance, or may have a defined service level agreement(SLA) between the VPN customer and the VPN service provider. Generally, a VPN has atopology more complex than point-to-point.

InternetworkAn internetwork is the connection of two or more private computer networks via a common

routing technology (OSI Layer 3) using routers. The Internet is an aggregation of manyinternetworks; hence its name was shortened to Internet.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 21/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Backbone networkA Backbone network (BBN) or network backbone is part of a computer network

infrastructure that interconnects various pieces of network, providing a path for the exchange ofinformation between different LANs or sub networks. A backbone can tie together diversenetworks in the same building, in different buildings in a campus environment, or over wideareas. Normally, the backbone's capacity is greater than the networks connected to it.

Global area networkA global area network (GAN) is a network used for supporting mobile communications

across an arbitrary number of wireless LANs, satellite coverage areas, etc. The key challenge inmobile communications is handing off the user communications from one local coverage area tothe next.

Intranets and ExtranetsAn intranet is a set of networks, using the Internet Protocol and IP-based tools such as web

browsers and file transfer applications that are under the control of a single administrative entity.Most commonly, an intranet is the internal network of an organization.

An extranet is a network that is limited in scope to a single organization or entity and alsohas limited connections to the networks of one or more other trusted organizations or entities.Technically, an extranet may also be categorized as a CAN, MAN, WAN, or other type ofnetwork, although an extranet cannot consist of a single LAN; it must have at least oneconnection with an external network.

InternetThe Internet is a global system of interconnected governmental, academic, corporate,

public, and private computer networks. It is based on the networking technologies of the InternetProtocol Suite.

The Internet is a worldwide collection of computer networks, cooperating with each otherto exchange data using a common software standard. Through telephone wires and satellite links,Internet users can share information in a variety of forms. The size, scope and design of theInternet allow users to:

• connect easily through ordinary personal computers and local phone numbers;• exchange electronic mail (E-mail) with friends and colleagues with accounts on the

Internet;• post information for others to access, and update it frequently;• access multimedia information that includes sound, photographic images and even video;

and• Access diverse perspectives from around the world.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 22/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

An additional attribute of the Internet is that it lacks a central authority—in other words,there is no "Internet, Inc." that controls the Internet. Beyond the various governing boards thatwork to establish policies and standards, the Internet is bound by few rules and answers to nosingle organization.

Many people think that the Internet is a recent innovation, when in fact the essence of it hasbeen around for over a quarter century. The Internet began as ARPAnet, a U.S. Department ofDefense project to create a nationwide computer network that would continue to function even ifa large portion of it were destroyed in a nuclear war or natural disaster.

During the next two decades, the network that evolved was used primarily by academicinstitutions, scientists and the government for research and communications. The appeal of theInternet to these bodies was obvious, as it allowed disparate institutions to connect to eachothers' computing systems and databases, as well as share data via E-mail.

The nature of the Internet changed abruptly in 1992, when the U.S. government beganpulling out of network management, and commercial entities offered Internet access to thegeneral public for the first time. This change in focus marked the beginning of the Internet'sastonishing expansion. The Internet is also the communications backbone underlying the WorldWide Web (WWW).

Working of the Internet• Where to Begin? Internet Addresses

Because the Internet is a global network of computers each computer connected to theInternet must have a unique address. Internet addresses are in the form nnn.nnn.nnn.nnn wherennn must be a number from 0 - 255. This address is known as an IP address. (IP stands forInternet Protocol)

The picture below illustrates two computers connected to the Internet; your computer withIP address 1.2.3.4 and another computer with IP address 5.6.7.8.

If you connect to the Internet through an Internet Service Provider (ISP), you are usuallyassigned a temporary IP address for the duration of your dial-in session. If you connect to the

Internet from a local area network (LAN) your computer might have a permanent IP address or itmight obtain a temporary one from a DHCP (Dynamic Host Configuration Protocol) server. Inany case, if you are connected to the Internet, your computer has a unique IP address.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 23/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

• Protocol Stacks and Packets So your computer is connected to the Internet and has a unique address. How does it 'talk'

to other computers connected to the Internet? An example should serve here: Let's say your IPaddress is 1.2.3.4 and you want to send a message to the computer 5.6.7.8. The message youwant to send is "Hello computer 5.6.7.8!". Obviously, the message must be transmitted overwhatever kind of wire connects your computer to the Internet. Let's say you've dialed into yourISP from home and the message must be transmitted over the phone line. Therefore the messagemust be translated from alphabetic text into electronic signals, transmitted over the Internet, andthen translated back into alphabetic text. How is this accomplished? Through the use ofa protocol stack . Every computer needs one to communicate on the Internet and it is usuallybuilt into the computer's operating system (i.e. Windows, UNIX, etc.). The protocol stack usedon the Internet is referred to as the TCP/IP protocol stack because of the two majorcommunication protocols used. The TCP/IP stack looks like this:

Protocol Layer Comments

Application Protocols Layer Protocols specific to applications such as WWW, e-mail, FTP,etc.

Transmission Control ProtocolLayer

TCP directs packets to a specific application on a computerusing a port number.

Internet Protocol Layer IP directs packets to a specific computer using an IP address.

Hardware Layer Converts binary packet data to network signals and back.(E.g. ethernet network card, modem for phone lines, etc.)

If we were to follow the path that the message "Hello computer 5.6.7.8!" took from ourcomputer to the computer with IP address 5.6.7.8, it would happen something like this:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 24/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

• The message would start at the top of the protocol stack on your computer and work it'sway downward.

• If the message to be sent is long, each stack layer that the message passes through maybreak the message up into smaller chunks of data. This is because data sent over the

Internet (and most computer networks) are sent in manageable chunks. On the Internet,these chunks of data are known as packets.

• The packets would go through the Application Layer and continue to the TCP layer. Eachpacket is assigned a port number. We need to know which program on the destinationcomputer needs to receive the message because it will be listening on a specific port.

• After going through the TCP layer, the packets proceed to the IP layer. This is whereeach packet receives its destination address, 5.6.7.8.

• Now that our message packets have a port number and an IP address, they are ready to besent over the Internet. The hardware layer takes care of turning our packets containing thealphabetic text of our message into electronic signals and transmitting them over thephone line.

On the other end of the phone line your ISP has a direct connection to the Internet. TheISPs router examines the destination address in each packet and determines where to sendit. Often, the packet's next stop is another router.

• Eventually, the packets reach computer 5.6.7.8. Here, the packets start at the bottom ofthe destination computer's TCP/IP stack and work upwards.

• As the packets go upwards through the stack, all routing data that the sending computer'sstack added (such as IP address and port number) is stripped from the packets.

• When the data reaches the top of the stack, the packets have been re-assembled into theiroriginal form, "Hello computer 5.6.7.8!"

Internet CongestionInternet congestion occurs when a large volume of data is being routed on low bandwidth

lines or across networks that have high latency and cannot handle large volumes. The result isslowing down of packet movement, packet loss and drop in service quality.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 25/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Congestion Collapse is the situation in which the congestion becomes so great thatthroughput drops to a low level and thus little useful communication occurs.

Various techniques have been developed in attempt to minimize congestion collapse incommunication networks. In addition to increasing capacity and data compression, they includeprotocols for informing transmitting devices about the current levels of network congestion andhaving them reroute or delay their transmissions according to congestion levels.

Congestion Control The processes that are used to reduce congestion in a network. Thisincludes making decisions such as: deciding when to accept new Traffic, when to delete packetsand when to adjust the routing policies used in the network.

Internet CultureThe Internet offers the hope of a more democratic society. By promoting a decentralized

form of social mobilization, it is said, the Internet can help us to renovate our institutions andliberate ourselves from our authoritarian legacies. The Internet does indeed hold thesepossibilities, but they are hardly inevitable. In order for the Internet to become a tool for socialprogress, not a tool of oppression or another centralized broadcast medium or simply a waste ofmoney, concerned citizens must understand the different ways in which the Internet can becomeembedded in larger social processes.

In thinking about culturally appropriate ways of using technologies like the Internet, thebest starting-point is with people -- coherent communities of people and the ways they thinktogether.

Let us consider an example. A photocopier company asked an anthropologist named JulianOrr to study its repair technicians and recommend the best ways to use technology in supportingtheir work. Orr took a broad view of the technicians' lives, learning some of their skills andfollowing them around. Each morning the technicians would come to work, pick up theircompany vehicles, and drive to customers' premises where photocopiers needed fixing; eachevening they would return to the company, go to a bar together, and drink beer. Although thecompany had provided the technicians with formal training, Orr discovered that they actuallyacquired much of their expertise informally while drinking beer together. Having spent the daycontending with difficult repair problems, they would entertain one another with "war stories",and these stories often helped them with future repairs. He suggested, therefore, that thetechnicians be given radio equipment so that they could remain in contact all day, telling storiesand helping each other with their repair tasks.

As Orr's story suggests, people think together best when they have something important incommon. Networking technologies can often be used to create a space for "communities ofpractice", like the photocopier technicians, to think together in their own ways. This is perhapsthe most common use of the Internet: discussion groups organized by people who wish to pooltheir information and ideas about a topic of shared interest . At the same time, we should notconsider the Internet in isolation. Regardless of whether they are located in the same geographic

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 26/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

region or distributed around the world, a community's members will typically think togetherusing several media, such as the telephone, electronic mail, printed publications, and face-to-facemeetings, and the Internet is best conceived as simply one component of this larger ecology ofmedia.

Social networks also influence the adoption of new technologies: if the members of acommunity already have social connections to one another than they are more likely to benefitfrom technological connections. Every culture has its own distinctive practices for creating andmaintaining social networks, and a society will be healthier in political and economic termswhen these practices are functioning well.

Authoritarian societies will attempt to suppress the cultural practices of networking, anddemocratic societies will promote them. Broad implementation of the Internet is one way topromote social networking, and the existing practices of networking can offer clues to the mosteffective ways of implementing the Internet.

Business Culture on Internet Today’s business environment is influenced greatly by market, economical, societal and

technological factors creating a lot of competition. Also these factors are unpredictable that theymay change unexpectedly at any time. Such changes in the business world have been defined asbusiness pressure.

The various environmental business pressures on companies today can be grouped intothree categories:

• Market • Societal • Technological

Strength of Internet business over traditional business can be made more clear by thecomparison of both. Online purchasing and selling through e-business offers opportunities andadvantages to the companies of all sizes engaged in different portfolios. Some of theseadvantages are:

• Sampling of products such as books, recorded lectures, and music cassettes is possible onWeb for business promotion.

• Business houses selling their goods through catalogues can reach additional globalcustomers at lower cost.

• For items subjected to frequent changes e.g. shares and bonds etc. . the changes inrates/quotations can be known instantly.

• Customer’s knowledge can be enhanced on topics such as news about local event, marketresearch, industrial report, software etc., which can be distributed easily over the Internet.

• A closer relationship can be developed amongst business sellers whose customer base ison the Internet.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 27/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

• For wholesalers, distributors, retailers etc., it is convenient and efficient to buy from websites.

• High quality, specialized products can be easily sold on Internet by the retailers. • Organizations can conduct interviews through Internet to select suitable candidates for

their requirements. • Group discussions can be conducted for corporate offices, industrial houses, business

firms, universities, etc. Disadvantages of Internet Business

1. Security2. Staying connected3. Availability4. Access5. Misunderstandings

Collaborative Computing and the Internet Collaborative computing is a term describing a variety of activities where people interact

with one another using desktops, laptops, palmtops, and sophisticated digital cellular phones. Ascomputers are best at handling data and representing information, person-to-personcommunication is enriched by an ability to share, modify, or collaboratively create data andinformation.

We believe collaborative computing is the future of the Internet. The Internet will evolvefrom its current role as a channel for information dissemination to a person-to-personcommunication medium.Some examples are listed below:

• Videoconferencing applications allow users to collaborate over local networks, privateWANs, or over the Internet.

• Internet collaboration tools provide virtual meetings, group discussions, chat rooms,whiteboards, document exchange, workflow routing and many other features.

• Multicasting is an enabling technology for groupware and collaborative work on theInternet that reduces bandwidth requirements.

• Instant messaging is like e-mail that happens in real time.• Workflow management is about coordinating the flow of documents (invoices, reports,

legal documents etc.) within an organization from one person to another.A good example of collaborative applications designed for Internet use are Microsoft’s

NetShow and NetMeeting.

Modes of Connecting to Internet

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 28/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

There are four ways of connecting a client computer to the Internet: a dial-up connectionusing a telephone line or an Integrated Services Digital Network (ISDN), a Digital SubscriberLine (DSL), a cable TV connection and a satellite connection.

Dial-up Connection/Telephone Line Internet ConnectivityA dial-up connection uses the analog telephone line for establishing a temporary

communication. Computer's digital signals must be converted to analog signals before they aretransmitted over standard telephone lines. This conversion is performed by a modem, a devicethat modulates (changes into an analog signal) and de modulates (converts an analog signal into adigital signal). Both the sending and receiving ends of a communication channel must have amodem for data transmission to occur. Using a dial-up line to transmit data is similar to using thetelephone to make a call. The client computer modem dials the preprogrammed phone numberfor a user's Internet Service Provider (ISP) and connects to one of the ISP's modems. After theISP has verified the user's account, a connection is established and data can be transmitted. Wheneither modem hangs up, the communication ends. The advantage of a dial-up line is that it costsno more than a local telephone call. Computers at any two locations can establish a connectionusing modems and a telephone network, to include wireless modems and cellular telephoneconnections. The limitation of a connection using the ordinary telephone line is a low speed, 28kbps. There are dedicated telephone lines that can transmit data at 56 kbps. Most 56 kbpsmodems connect at a speed less than 46 kbps because of the limitations of analog phone linesand telephone-company switches.

ISDNISDNs are special digital telephone lines that can be used to dial into the Internet at speeds

ranging from 64 to 128 kbps. These types of connections are not available everywhere telephonecompanies have to install special ISDN digital switching equipment. ISDNs require use of aspecial "digital modem" that sends and receives digital signals over ISDN lines. With an ISDN,the telephone line is divided into three channels (BRI - Basic Rate Interface), two-64 kbps B(bearer) channels that send data and one 16 kbps D (data) channel that sends routing information.This type of access is commonly referred to as 2B+D. To use the ISDN access to the Internet, anISP has to offer the ISDN access. ISDN lines cost more than normal phone lines, so thetelephone rates are usually higher.

Cable TV ConnectionCurrently most households with cable TV have the option for cable modem Internet access.

The cable modem offers a high-speed link at low cost for unlimited, "always connected" access.The connection speeds range from 128 kbps up to 10 mbps (megabits per second). A cablemodem is a device that connects to the existing TV cable feed and to an Ethernet network card inthe user's PC (also called an NIC - Network Interface Card). The cable network is designed to

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 29/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

support the highest speeds in the "downstream" direction, which is from the Internet to the clientcomputer. This downstream speed affects the performance of downloading Web pages andsoftware. The "upstream" bandwidth for data sent from a user's computer to the Internet istypically less, in the range of 200 kbps to 2 mbps. The benefit of the cable modem for Internetaccess is that, unlike DSL, its performance doesn't depend on distance from the central cableoffice. However, with the cable TV network, the computer is put on a Local Area Network(LAN) with other users in the neighborhood and like with any LAN, the performance degradesas usage increases. A more disturbing issue is that of network security. One of the main purposesof a LAN is to allow file sharing among the computers on the LAN. This LAN feature doesn'twork well with cable Internet access, as most users do not want neighbors accessing their files.Turning the sharing option off can prevent file sharing. Also, installing the firewall hardware orsoftware may protect from hackers.

DSL (Digital Subscriber Line)DSL service is a high-speed data service that works over POTS (Plain Old Telephone

Service) copper telephone lines and is typically offered by telephone companies without costlyinstallation of a higher-grade cable. DSL uses a different part of the frequency spectrum thananalog voice signals, so it can work in conjunction with a standard analog telephone service,providing separate voice and data "channels" on the same line. ADSL (Asymmetric DSL) is thetype of DSL that provides different bandwidths in the upstream and downstream directions,giving the user a much bigger "pipe" in the downstream direction. ADSL can supportdownstream bandwidths of up to 8 mbps and upstream bandwidths of 1.5 mbps. For comparison,a T-1 connection also provides 1.5 mbps. This scheme works well for the typical Internet user;upstream communication is usually small (link requests) compared to downstreamcommunication (Web pages with graphics).

SDSL (Symmetric DSL) offers the same bandwidth capability in both directions. Besideshigher bandwidth, some of the advantages of ADSL access from telephone companies are thatthere are no per-minute charges and the user gets an "always-on" connection for a monthly fee.Most modern computers can be easily equipped to connect to a DSL service. This isaccomplished by connecting an ADSL modem to an Ethernet network card in the PC. Thedownside of DSL includes strict distance limitation that DSL circuits can operate within. As theconnection's length increases, the signal quality decreases and the connection speed goes down.DSL services that provide greater that 1.5 mbps require shorter distances to the central officecompared to a cable modem that can be located far away from the service provider.

The limit for ADSL service is 18,000 feet (5,460 meters), though for speed and quality ofservice reasons many ADSL providers place a lower limit on the distances for the service. At theextremes of the distance limits, ADSL customers may see speeds far below the promisedmaximums, while customers near the central office have the potential for very high speeds.Unlike cable modem technology, DSL provides a point-to-point connection to ISP. DSL

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 30/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

proponents claim this technology is both more secure and less prone to local traffic fluctuationsthan its cable rival. By not sharing a LAN segment with other users, the systems are not as opento intrusion or susceptible to performance degradations related to local traffic.

Satellite ConnectionGetting the Internet feed from a satellite is really not all that different from getting TV

signals from one. In both cases data is being sent from the satellite to a user's equipment and thentranslated and decoded. One major limitation of satellite technology is that it can only send datafrom the satellite to a user's receiver—not the other way. To get around this problem, a separateISP connection is needed to send data to the Internet, typically over an analog modem. Thisconnection works in conjunction with the satellite feed. As information is requested via themodem line, data are sent back via the satellite. Since most Internet users need high bandwidthfrom the Web, downstream (typically Web pages and file downloads), and less bandwidth goingto the Web, upstream (typically link requests), this scenario of sending upstream data over astandard modem line and downstream data over the high-bandwidth satellite feed has beeneffective. The newest satellite technology allows for two-way communications and higherupstream bandwidths. A satellite return channel can be added for traffic bound for the Internet.The upload speeds through this satellite return channel may peak at 128 kbps. Download speedswith this system are up to 400 kbps. Satellite technology has one strong advantage over cablemodems and DSL : accessibility. For many it is today's only high-speed option. It can reachareas that are otherwise difficult to establish contact with. The infrastructure exists to provide400 kbps downstream bandwidth to almost anyone with a 21" satellite dish. It is eight timesfaster than fastest analog telephone modems and three times faster than ISDN. However, it is notas fast as cable modems or DSL services, which both can provide more than megabits ofbandwidth. Also, cable and DSL access methods are cheaper. Equipment required for satelliteconnection includes installation of a mini-dish satellite receiver and a satellite modem. Likecable modem systems, satellite provides a "shared bandwidth" pipe. This means that downloadperformance may vary depending upon other users of the satellite transponder. Another potentialproblem can be associated with severe weather. In severe snowstorms and heavy rain, users mayexperience signal fade.

The general rule about the Internet connection is the faster, the better. The bandwidth andtransfer rate determine how quickly pictures, sounds, animation and video clips will bedownloaded. Since multimedia and interactivity make the Internet such an exciting tool forinformation sharing, the speed is the key. Dial-up access provides an easy and inexpensive wayfor users to connect to the Internet, however, it is a slow-speed technology and most users are nolonger satisfied with dial-up or ISDN connections. Fortunately, the broadband access, we oncedreamed of, is now possible with TV cable, DSL and satellite links.

Internet Service Provider (ISPs)

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 31/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

An ISP, or Internet Service Provider, is a company that offers internet access to individualsand businesses for a monthly or yearly fees. In addition to internet connection, ISPs may alsoprovide related services like web site hosting and development, email hosting, domain nameregistration etc.

Different ISPs, and sometimes even the same one, offer different types of internetconnections - dialup, cable and DSL broadband. Hardware such as dialup modem or a wirelessmodem and router are usually provided by the company. When you register with an ISP for itsservices, an account is created and you are provided with the login details –username andpassword. You connect to the internet via your account and this way the company keeps a watchon your online activities. ISPs can be both regional, confined to a geographic area, or national,servicing the entire country and they are connected with each other through Network AccessPoints (NAPs). ISPs are also referred to as Internet Access Providers .

Types of internet accessMost ISPs offer several types of internet access which essentially differ in connection

speeds – the time taken for download and upload. Many also offer different plans or “packages”that vary in the download limit, number of email accounts on offer etc.Dialup internet access is probably the slowest connection and requires you to connect to theinternet via your phone line by dialing a number specified by the ISP. This means, dialupconnections are not “always on”, unless you want to raise a huge phone bill, you would sever theconnection when you finish work online.Cable internet access can be obtained from the local cable TV operator. However, ask them fora demo first or check with your neighbourers on the quality of service.Internet access via DSL broadband is indeed very fast and ISPs can offer different downloadspeeds – quicker the speed, higher will be the price. A wireless internet connection gives youfreedom and flexibility – you need not be confined to one place (the work table, for instance) andcan access the internet from any spot (even the bathroom) as long as your computer can catch thewireless signal. However, ensure that the provider secures the wireless connection with apassword.

In many countries, especially those in which internet is still a kind of luxury, the ISPs mayput a limit on the amount of data exchanged over a connection. For example, one may beallowed only a few GB (gigabytes) of download and upload each month. This is usuallysufficient for routine users but if you plan to download movies and music or other large files, youhave to keep a check on the amount of the data transfer.

How to choose an ISP?• Monthly or yearly charge : Yes, we all need to keep a close watch on our wallets but this

does not mean you pick a lousy ISP just because it’s cheap. The price would also varyacross different plans – ensure you get the best deal.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 32/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

• Type of internet access : A dialup connection would be more than enough if you plan toaccess the internet for only a few hours each week. Want to download movies, musicetc.? Get a broadband connection.

• Regional or national ISP : Are you a frequent traveller? If so, talk to a national ISP andsee if they have a plan that lets you use the same connection (via a USB modem) fromdifferent places.

• Extra services from the ISP.

IP address (Internet Protocol address) Number that uniquely identifies each computer on the Internet. A computer's IP address

may be permanently assigned or supplied each time that it connects to the Internet by an Internetservice provider. In order to accommodate the extraordinary growth in the number of devicesconnected to the Internet, a 32-bit protocol standard, known as IPv4, began to be replaced by a128-bit protocol, IPv6, in 2000.

Another Definition of IP address (Internet P rotocol address) The address of a device attached to an IP network (TCP/IP

network). Every client, server and network device is assigned an IP address, and every IP packettraversing an IP network contains a source IP address and a destination IP address.

Every IP address that is exposed to the public Internet is unique. In contrast, IP addresseswithin a local network use the same private addresses; thus, a user's computer in company A canhave the same address as a user in company B and thousands of other companies. However,private IP addresses are not reachable from the outside world.

Logical Vs. PhysicalAn IP address is a logical address that is assigned by software residing in a server or router.

In order to locate a device in the network, the logical IP address is converted to a physicaladdress by a function within the TCP/IP protocol software. The physical address is actually builtinto the hardware.

Static and Dynamic IPNetwork infrastructure devices such as servers, routers and firewalls are typically assigned

permanent "static" IP addresses. The client machines can also be assigned static IPs by a networkadministrator, but most often are automatically assigned temporary "dynamic" IP addresses viasoftware that uses the "dynamic host configuration protocol" (DHCP). Cable and DSL modemstypically use dynamic IP with a new IP address assigned to the modem each time it is rebooted.

The Dotted Decimal Address: x.x.x.x

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 33/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

IP addresses are written in "dotted decimal" notation, which is four sets of numbersseparated by decimal points; for example, 204.171.64.2. Instead of the domain name of a Website, the actual IP address can be entered into the browser. However, the Domain Name System(DNS) exists so users can enter computerlanguage.com instead of an IP address, and the domain(the URL) computerlanguage.com is converted to the numeric IP address.

Although the next version of the IP protocol offers essentially an unlimited number ofunique IP addresses (IPv6), the traditional IP addressing system (IPv4) uses a smaller 32-bitnumber that is split between the network and host (client, server, etc.). The host part can befurther divided into sub-networks.

Class A, B and CBased on the split of the 32 bits, an IP address is either Class A, B or C, the most common

of which is Class C. More than two million Class C addresses are assigned, quite often in largeblocks to network access providers for use by their customers. The fewest are Class A networks,which are reserved for government agencies and huge companies.

Domain Name System (DNS)The World Wide Web that we know today would have not existed, if it was not for the

Domain Name System. Every day when you go online and open a website, the Domain NameSystem is the backend, which helps you see the website you want.

What does actually stand behind that almighty 3-letter abbreviation - DNS? DNS refers toDomain Name System and represents a powerful Internet technology for converting domainnames to IP addresses. Its special mission is to be a mediator between the IP addresses, thesystem-side names of the websites and their respective domains, and their user-side alpha-numeric titles. Another important function of the DNS is to control the delivery of emailmessages

Behind every site, there is an IP address. But, while it's easy to remember the name of awebsite, it's quite hard to remember the exact IP address. For example, everybody knows aboutGoogle.com, but if you had to remember "74.125.45.100", things would have been much harder.

How does DNS work?A DNS program works like this - every time a domain name is typed in a browser it is

automatically passed on to a DNS server, which translates the name into its corresponding IPaddress (e.g. the domain name NTC Hosting.com is translated to 66.40.65.49). Thanks to theDNS, we do not need to bother to remember complicated numeric combinations to reach acertain website - we can use its meaningful and much easier to remember domain name instead.

Hierarchy of domain names

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 34/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

IPv6 (Internet Protocol Version 6)Internet Protocol Version 6 (IPv6) is a network layer protocol that enables data

communications over a packet switched network. Packet switching involves the sending andreceiving of data in packets between two nodes in a network. The working standard for the IPv6protocol was published by the Internet Engineering Task Force (IETF) in 1998. The IETFspecification for IPv6 is RFC 2460. IPv6 was intended to replace the widely used InternetProtocol Version 4 (IPv4) that is considered the backbone of the modern Internet. IPv6 is oftenreferred to as the "next generation Internet" because of it's expanded capabilities.

IPv6 and IPv4 share a similar architecture. The majority of transport layer protocols thatfunction with IPv4 will also function with the IPv6 protocol. Most application layer protocols areexpected to be interoperable with IPv6 as well, with the notable exception of File TransferProtocol (FTP). FTP uses embedded network layer addresses to facilitate data transmission. AnIPv6 address consists of eight groups of four hexadecimal digits. If a group consists of fourzeros, the notation can be shortened using a colon to replace the zeros.

A main advantage of IPv6 is increased address space. The 128-bit length of IPv6addresses is a significant gain over the 32-bit length of IPv4 addresses, allowing for an almostlimitless number of unique IP addresses. The size of the IPv6 address space makes it lessvulnerable to malicious activities such as IP scanning. IPv6 packets can support a larger payloadthan IPv4 packets resulting in increased throughput and transport efficiency.

A key enhancement over IPv4 is native support for mobile devices. IPv6 supports theMobile IPv6 (MIPv6) protocol which enables mobile devices to switch between networks andreceive a roaming notification regardless of physical location. Auto-configuration is another IPv6enhancement that is considered a great benefit to network administrators. IPv6 devices canindependently auto-configure themselves when connected with other IPv6 devices.Configuration tasks that can be carried out automatically include IP address assignment anddevice numbering. An IPv6 router has the ability to determine its own IPv6 address using data

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 35/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

link layer addressing parameters. The IPv6 protocol improves upon IPv4 with increasedauthentication and privacy measures. IPSec security is embedded into the IPv6 specification tomanage encryption and authentication between hosts. This built in security framework enablessecure data traffic between hosts that is independent of any applications on either host. In thisway, IPv6 provides an efficient end to end security framework for data transfer at the host or thenetwork level.

ModemsA modem is a Modulator/Demodulator . It connects a terminal/computer to the Voice

channel (dial-up line). A modem can establish two types of connections:Digital connection The connection between the modem and the terminal/computer is a digitalconnection.Analog connection The connection between the modem and the phone line is an analogconnection.

Types of Modem • Internal Modems are a plug-in circuit board that sits inside the computer. It incorporates

the serial port on-board. They are less expensive than external modems because they donot require a case, power supply and serial cable

• External Modems sit next to the computer and connect to the serial port using a cable

Communication SoftwareCommunication software is used to provide remote access to systems and exchange files

and messages in text, audio and/or video formats between different computers or user IDs. Thisincludes terminal emulators, file transfer programs, chat and instant messaging programs.

Internet ToolsThe internet communication takes place in following three ways and communication tools

are selected on the basis as follows:• One-to-One Communication This type of communication is very common on Internet

and tools are:• Email• Chat type systems

• Large and Small Group Communication tools are:• Social Networks•

Blogging• Instant Messaging• Chat• Usenet

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 36/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

• Mail-based discussion list• Mass Communication tools are:

• Net Video• Net Audio• Mass Media Outlets

Section B: World Wide Web

Introduction to World Wide WebThe World Wide Web, abbreviated as WWW and commonly known as the Web, is

a system of interlinked hypertext documents accessed via the Internet. With a web browser, onecan view web pages that may contain text, images, videos, and other multimedia and navigatebetween them via hyperlinks.

To use the Web, in addition to an Internet connection, a user needs a special piece ofsoftware called a Web Browser (such as Internet Explorer). The browser acts as the graphical

interface between the user and the Internet – it sends the necessary command to request datafrom other computers and then format them for the user’s screen. Documents that are formattedusing hypertext markup language (HTML) contain tag lines that inform the browser how toformat them.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 37/163

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 38/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

6. Images7. JavaScript and Java8. Messages • Bookmarks: A convenient feature of browsers allows you to save the URL of any Web

page you display.• Plug-ins: they extend the power of the browser.

Searching the World Wide WebSearching the WWW can be both beneficial and frustrating. This is where search engines

and web directories come in. Search engines, such as Google or Yahoo, are large databases ofinformation that store and retrieve relevant website results based on keywords. Web directories,such as the Open Directory Project, are attempts to organize the best of the existing websites intocategories and subcategories. No search engine or web directory will have the same sites listed inthe same order, and none will have all of the possible sites on the Internet listed. Furthermore,the ranking of a website within a search engine (i.e. how high up on the results list it appears) hasas much to do with politics as it does with quality information.

Recently, search engines such as Google and Yahoo have also been providing "sponsoredlinks"; links that appear on the first few pages of the search results and that are paid for byadvertisers. This means that you may end up clicking on something that is not relevant to yoursearch, but instead actually advertising. The image presented here gives you an example of thison Google.

Kinds of Search Engines and Directories

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 39/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Web directoriesWeb directories (also known as indexes, web indexes or catalogues) are broken down into

categories and sub-categories and are good for broad searches of established sites. For example,if you are looking for information on the environment but not sure how to phrase a potentialtopic on holes in the ozone, you could try browsing through the Open Directory Project'scategories. In the Open Directory Project's "Science" category, there is a subcategory of"Environment" that has over twenty subcategories listed. One of those subcategories is "GlobalChange" which includes the "Ozone Layer" category. The "Ozone Layer" category has overtwenty-five references, including a FAQ site. Those references can help you determine the keyterms to use for a more focused search.

Search enginesSearch engines ask for keywords or phrases and then search the Web for results. Some

search engines look only through page titles and headers. Others look through documents, suchas Google , which can search PDFs. Many search engines now include some directory categoriesas well (such as Yahoo).

Metasearch enginesThese (such as Dogpile, Mamma, and Metacrawler) search other search engines and often

search smaller, less well known search engines and specialized sites. These search engines aregood for doing large, sweeping searches of what information is out there.

A few negatives are associated with metasearch engines . First, most metasearch engineswill only let you search basic terms, so no Boolean operators or advanced search options.Second, many metasearch engines pull from pay-per-click advertisers, so the results you get mayprimary be paid advertising and not the most valid results on the web

Searching with a Search EngineA search engine is a device that sends out inquiries to sites on the web and catalogs any

web site it encounters, without evaluating it. Methods of inquiry differ from search engine tosearch engine, so the results reported by each one will also differ. Search engines maintain anincredibly large number of sites in their archives, so you must limit your search terms in order toavoid becoming overwhelmed by an unmanageable number of responses.

Search engines are good for finding sources for well-defined topics. Typing in a generalterm such as "education" or "Shakespeare" will bring back far too many results, but bynarrowing your topic, you can get the kind (and amount) of information that you need.Adjust your search based upon the number of responses you receive (if you get too fewresponses submit a more general search; if you get too many, add more modifiers).

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 40/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Learn how the search engine worksRead the instructions and FAQs located on the search engine to learn how that particular

site works. Each search engine is slightly different, and a few minutes learning how to use thesite properly will save you large amounts of time and prevent useless searching.

Each search engine has different advantages. Google is one of the largest search engines,followed closely by MSN and Yahoo. This means that these three search engines will search alarger portion of the Internet than other search engines. Lycos allows you to search by region,language, and date. Altavista has searches for images, audio, video, and news. Ask Jeeves allowsyou to phrase your search terms in the form of a question. It is wise to search through multiplesearch engines to find the most available information.

Search Fundamentals The Internet contains a vast collection of information, which is spread out in every part of

the world on remote web servers. The problem in locating the correct information on the Internetled to the creation of search technology, known as Internet Search Engine. A search engine canprovide links to relevant information based on your requirement or query. In order to understandthe terminology and techniques to position our web site pages for higher ranking in searchengines, the knowledge of the basic functioning of a search engine is essential.

Functions of Internet Search Engines Each search engine dies the same functions of collecting, organizing, indexing and serving

results in its own unique ways, thus employing various algorithms and techniques. In short, thefunctions of a search engine can be categorized into the following:

1. Crawling and Spidering the Web: The Crawler (also known as a web robot or a webspider) is a software program that can download web content and follow hyperlinkswithin these web contents to download the linked contents.

2. Building the Index: Search engines must store the information in a way that makes ituseful.

3. Storing the Web Site Contents4. Search Algorithms and Results

Search StrategiesSearch engines are good for finding sources for well-defined topics. Typing in a general

term such as "education" or "Shakespeare" will bring back far too many results, but bynarrowing your topic, you can get the kind (and amount) of information that you need.Example:

• Go to Google (a search engine)• Type in a general term ("education")

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 41/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

• Add modifiers to further define and narrow your topic ("rural education Indiana")• Be as specific as you can ("rural education Indiana elementary school")• Submit your search.

Learn how the search engine works (Working of Search Engines)Read the instructions and FAQs located on the search engine to learn how that particular

site works. Each search engine is slightly different, and a few minutes learning how to use thesite properly will save you large amounts of time and prevent useless searching.Each search engine has different advantages. Google is one of the largest search engines,followed closely by MSN and Yahoo. This means that these three search engines will search alarger portion of the Internet than other search engines. Lycos allows you to search by region,language, and date. Altavista has searches for images, audio, video, and news. Ask Jeeves allowsyou to phrase your search terms in the form of a question. It is wise to search through multiplesearch engines to find the most available information.Select your terms carefully

Using inexact terms or terms that are too general will cause you problems. If your terms aretoo broad or general, the search engine may not process them. Search engines are programmedwith various lists of words the designers determined to be so general that a search would turn uphundreds of thousands of references. Check the search engine to see if it has a list of such stopwords. One stop word, for example, is "computers." Some search engines allow you to searchstop words with a specific code (for Google, entering a "+" before the word allows you to searchfor it).

If your early searches turn up too many references, try searching some relevant ones to findmore specific or exact terms. You can start combining these specific terms with NOT when yousee which terms come up in references that are not relevant to your topic. In other words, keeprefining your search as you learn more about the terms.

You can also try to make your terms more precise by checking the online catalog of alibrary. Most search engines now have "Advanced Search" features. These features allow you touse Boolean operators (below) as well as specify other details like date, language, or file type.

Know Boolean operatorsMost search engines allow you to combine terms with words (referred to as Boolean

operators) such as "and," "or," or "not." Knowing how to use these terms is very important for asuccessful search. Most search engines will allow you to apply the Boolean operators in an"advanced search" option.

ANDAND is the most useful and most important term. It tells the search engine to find your first

word AND your second word or term. AND can, however, cause problems, especially when you

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 42/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

use it with phrases or two terms that are each broad in themselves or likely to appear together inother contexts.

For example, if you'd like information about the basketball team Chicago Bulls and type in"Chicago AND Bulls," you will get references to Chicago and to bulls. Since Chicago is thecenter of a large meat packing industry, many of the references will be about this since it is likelythat "Chicago" and "bull" will appear in many of the references relating to the meat-packingindustry.OR

Use OR when a key term may appear in two different ways. For example, if you wantinformation on sudden infant death syndrome, try "sudden infant death syndrome OR SIDS." ORis not always a helpful term because you may find too many combinations with OR. Forexample, if you want information on the American economy and you type in "American OReconomy," you will get thousands of references to documents containing the word "American"and thousands of unrelated ones with the word "economy."

NEARNEAR is a term that can only be used on some search engines, and it can be very useful. It

tells the search engine to find documents with both words but only when they appear near eachother, usually within a few words.

For example, suppose you were looking for information on mobile homes, almost everysite has a notice to "click here to return to the home page." Since "home" appears on so manysites, the search engine will report references to sites with the word "mobile" and "click here toreturn to the home page" since both terms appear on the page. Using NEAR would eliminate thatproblem. At the time of the last handout update, Altavista is the only major search engine toallow "NEAR" searches.

NOTNOT tells the search engine to find a reference that contains one term but not the other.

This is useful when a term refers to multiple concepts. For example, if you are working on aninformative paper on eagles, you may encounter a host of websites that discuss the football teamthe Philadelphia Eagles, instead. To omit the football team from your search results, you couldsearch for "eagles NOT Philadelphia."

Other Strategies for Web Searching

Looking for information about job opportunities? Look at some of the sites listing jobvacancies. Try university websites that sometimes list jobs through their placement offices, or tryprofessional organizations which also sometimes list jobs in that field. Or look through thewebsites of various large companies because they usually have a section on job opportunities intheir company.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 43/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Looking for information likely to be discussed on newsgroups or chat rooms? Look throughthe lists of newsgroups or use a search engine.Looking for information about a current topic? Check the newspaper and currentnewsmagazine sites. Most have a search engine for articles in their publications.Looking for data that might have been collected on a government site? Start with sites suchas the Library of Congress or The White House.

TelnetTelnet is a network protocol used on the Internet or local area networks to provide a

bidirectional interactive text-oriented communications facility using avirtual terminal connection. User data is interspersed in-band with Telnet control information inan 8-bit byte oriented data connection over the Transmission Control Protocol (TCP).

Telnet was developed in 1969 beginning with RFC 15, extended in RFC 854, andstandardized as Internet Engineering Task Force (IETF) Internet Standard STD 8, one of the firstInternet standards.

Historically, Telnet provided access to a command-line interface on a remote host. Mostnetwork equipment and operating systems with a TCP/IP stack support a Telnet service forremote configuration (including systems based on Windows NT). Because of security issues withTelnet, its use for this purpose has waned in favor of SSH.

The term telnet may also refer to the software that implements the client part of theprotocol. Telnet client applications are available for virtually all computer platforms. Telnet isalso used as a verb. To telnet means to establish a connection with the Telnet protocol, eitherwith command line client or with a programmatic interface. For example, a common directivemight be: " To change your password, telnet to the server, login and run the passwd command. "Most often, a user will be telnetting to a Unix-like server system or a network device (such as arouter) and obtain a login prompt to a command line text interface or a character-based full-screen manager.

Telnet is a client-server protocol, based on a reliable connection-oriented transport.Typically this protocol is used to establish a connection to Transmission ControlProtocol (TCP) port number 23, where a Telnet server application (telnetd) is listening. Telnet,however, predates TCP/IP and was originally run over Network Control Program (NCP)protocols.

Because of negotiable options protocol architecture, many extensions were made for it,some of which have been adopted as Internet standards, IETF documents STD 27 through STD32. Some extensions have been widely implemented and others are proposed standards on theIETF standards track.

Experts in computer security, such as SANS Institute, recommend that the use of Telnet forremote logins should be discontinued under all normal circumstances, for the following reasons:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 44/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

• Telnet, by default, does not encrypt any data sent over the connection (including passwords),and so it is often practical to eavesdrop on the communications and use the password laterfor malicious purposes; anybody who has access to a router, switch, hub or gateway locatedon the network between the two hosts where Telnet is being used can intercept the packetspassing by and obtain login, password and whatever else is typed with a packet analyzer.

• Most implementations of Telnet have no authentication that would ensure communication iscarried out between the two desired hosts and not intercepted in the middle.

• Commonly used Telnet daemons have several vulnerabilities discovered over the years.

These security-related shortcomings have seen the usage of the Telnet protocol droprapidly, especially on the public Internet, in favor of the Secure Shell (SSH) protocol. SSHprovides much of the functionality of telnet, with the addition of strong encryption to preventsensitive data such as passwords from being intercepted, and public key authentication, to ensurethat the remote computer is actually who it claims to be. As has happened with other earlyInternet protocols, extensions to the Telnet protocol provide Transport Layer Security (TLS)security and Simple Authentication and Security Layer (SASL) authentication that address theabove issues. However, most Telnet implementations do not support these extensions; and therehas been relatively little interest in implementing these as SSH is adequate for most purposes.

FTP (File Transfer Protocol)File Transfer Protocol (FTP) is a standard network protocol used to transfer files from one

host to another host over a TCP-based network, such as the Internet. FTP is built on a client-server architecture and uses separate control and data connections between the client andserver. FTP users may authenticate themselves using a clear-text sign-in protocol but can connectanonymously if the server is configured to allow it.

The first FTP client applications were interactive command-line tools, implementingstandard commands and syntax. Graphical user interface clients have since been developed formany of the popular desktop operating systems in use today.

FTP operates on the application layer of the OSI model, and is used to transfer filesusing TCP/IP. In order to do this an FTP server needs to be running and waiting for incomingrequests. The client computer is then able to communicate with the server on port 21. Thisconnection, called the control connection, remains open for the duration of the session, with asecond connection, called the data connection, either opened by the server from its port 20 to anegotiated client port (active mode) or opened by the client from an arbitrary port to a negotiatedserver port (passive mode) as required to transfer file data. The control connection is used forsession administration (i.e., commands, identification, passwords) exchanged between the clientand server using a telnet-like protocol. For example "RETR filename" would transfer thespecified file from the server to the client. Due to this two-port structure, FTP is consideredan out-of-band protocol, as opposed to an in-band protocol such as HTTP.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 45/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

The server responds on the control connection with three digit status codes in ASCII withan optional text message, for example "200" (or "200 OK.") means that the last command wassuccessful. The numbers represent the code number and the optional text represent explanations(e.g., <OK>) or needed parameters (e.g., <Need account for storing file>). A file transfer inprogress over the data connection can be aborted using an interrupt message sent over the controlconnection.

FTP can be run in active or passive mode, which determines how the data connection isestablished. In active mode, the client sends the server the IP address and port number on whichthe client will listen, and the server initiates the TCP connection. In situations where the client isbehind a firewall and unable to accept incoming TCP connections, passive mode may be used. Inthis mode the client sends a PASV command to the server and receives an IP address and portnumber in return. The client uses these to open the data connection to the server.

While transferring data over the network, four data representations can be used:

• ASCII mode: used for text. Data is converted, if needed, from the sending host's characterrepresentation to "8-bit ASCII" before transmission, and (again, if necessary) to the receivinghost's character representation. As a consequence, this mode is inappropriate for files thatcontain data other than plain text.

• Image mode (commonly called Binary mode): the sending machine sends each file byte forbyte, and the recipient stores the bytestream as it receives it. (Image mode support has beenrecommended for all implementations of FTP).

• EBCDIC mode: use for plain text between hosts using the EBCDIC character set. This modeis otherwise like ASCII mode.

• Local mode: Allows two computers with identical setups to send data in a proprietary formatwithout the need to convert it to ASCII

For text files, different format control and record structure options are provided. Thesefeatures were designed to facilitate files containing Telnet or ASA formatting.Data transfer can be done in any of three modes:

• Stream mode: Data is sent as a continuous stream, relieving FTP from doing any processing.Rather, all processing is left up to TCP. No End-of-file indicator is needed, unless the data isdivided into records.

• Block mode: FTP breaks the data into several blocks (block header, byte count, and datafield) and then passes it on to TCP. [5]

• Compressed mode: Data is compressed using a single algorithm (usually run-lengthencoding).

Coast-to-Coast Surfing

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 46/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

The Web provides a means of accessing an enormous collection of information, includingtext, graphics, audio, video, movies, and so on. One of the most exciting aspects of the Web isthat information can be accessed in a nonlinear and experimental fashion. Unlike reading a bookby flipping to the next page in sequential order, you can “jump” from one topic to another viahyperlinks. This nonlinear approach to information gathering, or browsing is sometimes referredto as “coast-to-coast surfing”.

HTMLHyperText Markup Language (HTML) is the predominant markup language for web pages.

HTML elements are the basic building-blocks of web pages.

HTML TagsHTML 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 Documents = Web Pages HTML documents describe web pages HTML documents contain HTML tags and plain text HTML documents are also called web pages

HTML elements form the building blocks of all websites. HTML allows images andobjects to be embedded and can be used to create interactive forms. It provides a means tocreate structured documents by denoting structural semantics for text such as headings,paragraphs, lists, links, quotes and other items. It can embed script sin languages suchas JavaScript which affect the behavior of HTML web pages.

Web browsers can also refer to Cascading Style Sheets (CSS) to define the appearance andlayout of text and other material. The W3C, maintainer of both the HTML and the CSSstandards, encourages the use of CSS over explicitly presentational HTML markup.

Web Page InstallationIn order to view web pages, one needs to install them on the Web Server. A Web Server is

a program, located on a computer with internet access that responds to a browser’s request for aURL.

Basic Principles Basic principles for web page installation are:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 47/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

You need to have Web pages to publish. A Web Server where the files must be placed must be available to you. The permissions on the files need to be set so that any user anywhere can read them. When someone requests your web page, the server has to deliver it.

Web Page SetupWeb pages are created with the help of HTML (Hyper Text Markup Language). The pages

are set up with the help of the tags available in HTML. Some of them are:

Head tag The <HEAD> tag has no attributes. Several other tags can be included inside it. Basefont tag The <BASEFONT> tag defines the font size to be used in the HTML

document and may be included in the head of the document. Base tag The <BASE> tag is useful for setting some global parameters of an HTML

document and may be included in the head of the document. A global parameter is anattribute that has an effect on the entire document.

Meta tag etc. The <META> tag is used to include additional information about adocument and can be used to pass additional information to a browser. There is no endingfor a <META> tag and a document can have multiple <META tags.

Basics of HTMLHTML is short for HyperText Markup Language.

• Hypertext is simply a piece of text that works as a link.• Markup Language is a way of writing layout information within documents.

Basically an HTML document is a plain text file that contains text and nothing else. Whena browser opens an HTML file, the browser will look for HTML codes in the text and use themto change the layout, insert images, or create links to other pages. Since HTML documents are

just text files they can be written in even the simplest text editor

Brief HTML BackgroundHTML has not been around for many years. November 1990 marks the day of the first web

page and back then there were little to no HTML standards to be followed. A group called theWorld Wide Web Consortium was then formed and has since set the standards that are widelyaccepted and we will base our teachings around them.

Web PagesWeb pages have many uses. Here are some important facts about why web pages are so useful.

• A cheap and easy way to spread information to a large audience.• Another medium to market your business.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 48/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

• Let the world know about you with a personal website!

Words to Know• Tag - Used to specify ("mark-up") regions of HTML documents for the web browser to

interpret. Tags look like this: <tag>• Element - A complete tag, having an opening <tag> and a closing </tag>.• Attribute - Used to modify the value of the HTML element. Elements will often have

multiple attributes.For now just know that a tag is a command the web browser interprets, an element is a

complete tag, and an attribute customizes or modifies HTML elements.

HTML Head Section

HTML Head TagThe <head> tag is a part of basic structure of HTML documents. It is intended for keepingtechnical and some other data of web-page. These do not show on the screen (except for <title>tag).List of tag's which are placed inside <head> tag. <base> Determines a base address of current document. It has two attributes:href - the address which should be used for the creation of a full path to files.target - the name of window or frame where links will be open.

<basefont> Determines a default font of document. It has three attributes: color - determinescolor of the textface - determines a face of font.size - determines a size of font (may have values from 1 to 7). Default value is 3.<link> Links an internal file to a HTML document (for example, CSS file).<meta> Determines metatags which contain information for browsers and search systems.<script> It is intended for the description of scripts.<style> Determines styles of the web page.<title> Creates a web-page's title which shows in the title of a browser window. Requires a

closing tag. If it is not determined, browser will show page file name.

Example<head><title>Title of the page</title></head>

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 49/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

It's a basic example of using <head> tag. On the picture you may see title of page, determined in<title> tag.

Example<head><base href="http://yoursite.com/www/" target="_blank"><basefont face="sans-serif" color="darkblue"><title>Example of head tag</title></head>

This example shows how you can use <head> tag for basic formatting of web-page. Youwill receive the page with sans-serif dark blue font of text. All links will be open in new window.

The HTML Body SectionWhen you create a blank HTML document, if the body section is left blank you will see

nothing on the screen. The <body> tag is the central and most important part in an HTMLdocument. In fact, it is needed to be able to see anything on the screen. While the header tag isimportant also, mostly every standard tag in HTML goes into the body. It is the core of the page.

List of <body> tag's attributesAlink: Determines a color of active link (when mouse button pressed).Background: Determines a background image.Bgcolor: Determines a background colorBgproperties: Determines either background will be scrolled with content of page or not. Haveone value "fixed" only.Link: Determines color of hyperlinks.Vlink: Determines color of visited hyperlinks.Text: Determines color of text on page.Scroll: Determines either show scroll bars or no.bottommargin, leftmargin, topmargin: Margins from bottom, left or top edge of browserwindow.

The body tag can be used to control the background color of the document by setting theattribute "bgcolor" using a hex value (see the tutorial on Colors for details). You can add otherattributes to control the link and text colors and they will be the defaults for the web page you areattempting to build. Additionally, you can set an image to become the background through the

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 50/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

background attribute. For the image to load in all popular browsers, it is recommended to be inthe jpeg format as it generally loads faster than gif or png images.

If image is not found or browser don't show pictures, image will not appeared. Backgroundwill have color which determines by "bgcolor" tag.

FormattingHTML Text Formatting Tags: There are 3 types of text formatting tags:

1. Text Phrase Tags<strong> Makes the text appear in a strong bold way.Example<strong>Strong Text</strong>Strong Text

<em> Makes the text appear in an emphasized way.Example<em>Emphasized Text</em>

Emphasized Text

<code> Makes the text appear as computer code.Example<code>Computer Code Text</code>Computer Code Text

<samp> Makes the text appear as sample computer code.Example<samp>Sample Computer Code Text</samp>Sample Computer Code Text

<cite> Makes the text appear as a citation.Example<cite>Citation Text</cite>Citation Text You can also combine any of these tags together for a "mixed" result:<strong><em>Strong Emphasized Text</em></strong>Strong Emphasized Text

2. Text Style Tags <tt> Makes the text appear as mono spaced or teletype

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 51/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Example<tt>Mono Spaced Text</tt>Mono Spaced Text

<small> Makes the text appear as small text.Example<small>Small Text</small>Small Text

<big> Makes the text appear as big text.Example<big>Big Text</big>Big Text

<i> Makes the text appear as italic (Identical to the <em> tag).Example<i>Italics Text</i>

Italics Text

<b> Makes the text appear as bold text (Identical to the <strong> tag).Example<b>Bold Text</b>Bold Text

You can also combine any of these tags together for a "mixed" result:<b><big>Bold Big Text</big></b>Bold Big Text

3. Text "Alignment" Tags<pre> Text has been pre-formatted if used.Example<pre>Pre formated text that

will keep both spaces andline breaks.</pre>

Pre formated text thatwill keep both spaces and

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 52/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

line breaks.

<blockquote> Used to display long quotations.Example<blockquote>Basically an HTML document is a plain text file that contains text and nothing else. When abrowser opens an HTML file, the browser will look for HTML codes in the text and use them tochange the layout, insert images, or create links to other pages.Since HTML documents are just text files they can be written in even the simplest text editor </blockquote>

And here, we have a LONG quotation:Basically an HTML document is a plain text file that contains text and nothing else. When abrowser opens an HTML file, the browser will look for HTML codes in the text and use them tochange the layout, insert images, or create links to other pages.Since HTML documents are just text files they can be written in even the simplest text editor

<q> Used to display short quotations. Will automatically place quotations around the text.Example<q>Here we have a small quotation. This tag will automatically place quotations around the text.</q>

Here we have a small quotation. This tag will automatically place quotations around the text.<p> Used to define a paragraph.Example<p>Paragraph Text goes here</p>Paragraph Text goes here.

<br /> Used to insert a single line break in the text. (There is no end tag, so <br><br /> iswrong).ExampleI am on one line and <br /> then I am on another.I am on one line andthen I am on another.

Header Tags

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 53/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

<h1> Makes the text appear as the largest header.<h6> Makes the text appear as the smallest header.Example<h1>Header 1</h1>Header 1

<h2>Header 2</h2>Header 2

<h3>Header 3</h3>Header 3

<h4>Header 4</h4>Header 4

<h5>Header 5</h5>Header 5

<h6>Header 6</h6>Header 6

HyperlinksHyperlinks can take the form of linking to one web page to another web page, opening an

email or FTP client, or call for some other action. They are how we get from point A to point Bon the World Wide Web; they are what make the web user friendly and convenient. A hyperlinkcan also move you from one point to another within a single page by using the "#" symbol.

Creating HyperlinksWe use <A> element (A stands for anchor) to create hyperlinks in HTML. The most

common form of hyperlink is undoubtedly the text hyperlink, where the hyperlink itself usuallyappears underlined and in a different color from the surrounding text to see it off from that text.

Creating Text HyperlinksThe standard form of a hyperlink element looks like this:Find the answers at <A HREF= http://W3C.org >W3C</A>.<A> tag is used to set up the a hyperlink and HREF attribute to set the target of the hyperlink tohttp://W3C.org (which is the home page for the World Wide Web Consortium). This the URLthat browser will navigate to when the user clicks the link. The text inside the <A> element willappear in the hyperlink style for the page.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 54/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Example<HTML>

<HEAD><TITLE>

Creating A Hyperlink</TITLE>

</HEAD>

<BODY><CENTER>

<H1>Creating A Hyperlink

</H1>Here is a Website to Check Out...<A HREF="HTTP://W3C.ORG">W3C</A>!

</CENTER></BODY>

</HTML>

The results of this HTMLappear in following figure:

Creating Graphical HyperlinksIn addition to text, you can also use images as hyperlinks. Doing so is easy to do – just put

an <IMG> element in the <A> element instead of the text. Here is an example:

<HTML><HEAD><TITLE>

Creating A Graphical Hyperlink

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 55/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

</TITLE></HEAD>

<BODY><CENTER>

<H1>Creating A Graphical Hyperlink

</H1>

<A HREF="http://W3C.ORG"><IMG WIDTH=110 HEIGHT=110 SRC="C:\Documents and

Settings\Meenakshi\My Documents\My Pictures\flowers.gif"ALT="Click me to go to W3C">

</A></CENTER>

</BODY></HTML>

The results of this HTML appear in following figure. When the user clicks the image in thefigure, the browser navigates to the hyperlink’s target, http://W3C.org

Linking to a Section of a Document It is also possible to link to a section of a document instead of linking to the document as a

whole. Anchors can be used. Creating anchors is another valuable use of the <A> element.Anchors supply a name to a section of a page, so you can use the anchor’s name to navigate tothat section.

Example<HTML>

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 56/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

<HEAD><TITLE>

Linking to A Section In A Page</TITLE>

</HEAD><BODY>

<CENTER><H1>

Linking to A Section In A Page</H1>Click here to go to the<A HREF="#BOTTOM">bottom</A>of the Page.

<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 57/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><HR>

<A NAME="BOTTOM">This is the bottom of the page.</A></CENTER>

</BODY></HTML>

Results are shown in the figures given below:

Figure: Creating an anchored Hyperlink

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 58/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Figure: Navigating to an Anchor

Creating Navigational Aids with Hyperlinks One popular use of hyperlinks is to make it easy to navigate around a web site using image

buttons, like arrows. Here is an example that displays arrows to let the user navigate to the nextor previous page in a series of pages, or to navigate to the home page just by clicking theappropriate image:

<HTML><HEAD>

<TITLE>Creating Graphical Navigational Aids

</TITLE>

</HEAD><BODY><CENTER>

<H1>Creating Graphical Navigationa Aids

</H1>Want to get somewhere fast? Click a button below...

<BR><A HREF="prev.html">

<IMG WIDTH=172 HEIGHT=117 SRC="C:\Documents and

Settings\Meenakshi\My Documents\My Pictures\left.gif"ALT="Previous" BORDER=0>

</A>

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 59/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

<A HREF="index.html"><IMG WIDTH=161 HEIGHT=105 SRC="C:\Documents and

Settings\Meenakshi\My Documents\My Pictures\home.gif"ALT="Home" BORDER=0>

</A><A HREF="next.html">

<IMG WIDTH=172 HEIGHT=117 SRC="C:\Documents andSettings\Meenakshi\My Documents\My Pictures\right.gif"

ALT="Next" border=0></A>

</CENTER></BODY>

</HTML>

The result of this HTML appears in the figure given below:

Using Front Page Express and Plug-insOverview

FrontPage Express is a Hyper Text Markup Language (HTML) Editor. FrontPage Expressis a simpler version of FrontPage. Once you have mastered FrontPage Express, it would be veryeasy to upgrade to FrontPage to allow for more details to your web page.FrontPage Express is very similar to Word97.

Toolbar

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 60/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Text Entering text into a webpage is much like entering text into a word processor. Simply type

the text you want to appear and then use the following steps to spice it up.

Layout The text on your webpage doesn't have to all be in paragraph blocks. You do something:

Line Break When you press ENTER at the end of a line of text, the cursor drops down two lines andstarts a new paragraph. The only way to get text directly underneath the first line of textis to finish filling up the line and letting word-wrap do the rest But sometimes you wantto go to the very next line after only a few words. An example of this is a centeredheading:

Jenny KiaschkoEd Psy 490NET

• This is called a Line Break . To create a line break, simply hold down the SHIFT keyand press ENTER .

• Alignment

You can align text and pictures to the right, center, or left of your webpage. To do this,highlight the text or picture you want to move and click on either the right, center, or leftbuttons on the toolbar. If you haven't started typing the text, just click on either the right,center, or left buttons and the cursor will move to that part of the page.

• Indents You can indent blocks as text as well. To indent some text, click the Increase IndentIcon on the toolbar. To out-dent or un-indent some text, click the Decrease IndentIcon on the toolbar. When you indent or out-dent a block of text, the entire paragraph thatthe text is in is indented or out-dented. So be careful when using indent and out-dent,especially inside of lists.

Lists You can also make lists. Lists are indented and denoted and are especially good foroutlines. Here is an example of the two major kinds of lists, the Numbered List andthe Bulleted List:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 61/163

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 62/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

and so...

build a nested list, start by creating the top most list, or parent. (In the case above, you'd makea Numbered List and type in the first item.) Then to make a sub-list of that item, do thefollowing:

o Press ENTER after typing in the list item of the parent list.o Click the Increase Indent Icon .o Select the either the Numbered List or Bulleted List Icon from the toolbar. (In

the case above, you'd select Numbered List .)o Type in the first item of the nested list.

To end a sub-list and return to its parent list (In the example above, end the listcontaining Mike Loosbrock and Matt Christians and get back to list containing WorkStudy, Part-Time Employees, and Staff), do the following:

• Press ENTER after typing in the last item of the sub-list.• Either press BACKSPACE twice, or click the Decrease Indent Icon twice.

Attributes FrontPage Express allows you to make all the same attribute changes you can make in

Word97. The first step in changing text attributes is to highlight the text you want to modify withthe mouse. You can then make the following changes:

1. Font Type

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 63/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Font type is the font family of text, such as Comic Sans, Times New Roman, and CourierNew. To change the font type, select the font you want from the Font Type List Box onthe toolbar. (Try not to use a lot of non-standard fonts because if the font is not loaded onthe computer where your page is being viewed, the font will appear as the browserdefault.)

1. Font Style The style of the text can either be bold, italics , or underline. To change the font style,select one or more of the Style Icons on the toolbar.• Font Color The color of the text can also be changed. To change the font color, select the Text ColorIcon on the toolbar. The Color Dialog Box appears. Choose the color you want and clickOK.

• Font Size You can change the font size by clicking the eitherthe Increase TextSize or Decrease Text Size Icon from the toolbar.

ImagesYou can insert images ( *.gif, *.jpg, *.bmp ) into your webpage. Keep in mind that you

need to keep your images relatively small in size, otherwise, your pages will take a long time todownload.

To insert an image, put your cursor where you want to place the image and then:1) Select the Insert Image icon from the toolbar.2) The Image Dialog Box appears. Click the Browse Button.3) Find and select the image you wish to insert and click OK.

The image should appear on the webpage. After you have placed the image on thewebpage, you can change the attributes of the image by right clicking on the image andchoosing Image Properties.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 64/163

8km milestone ,We&site ' ww

The Image Properties Dialo

Links Links create a connecti

your page to other pages acroTo link to a webpage

example, you might want thto http://www.cnn.com). To dlinked (in this case, we woulHyperlink Icon on the toolba

World Institute Of Technologyohna Palwal Road , NH !" # ,Sohna , $urgaon ,%wit%net%in ( mail ' info)wi

Box appears. Choose the Appearance Tab .

n between more than one of your pages.s the World Wide Web.

other than your own, determine where yoviewer to click on the words "CNN New

o this, first highlight the text, picture, or bohighlight the words "CNN News"). Next cli

r.

Haryana%t%net%in

inks also can connect

want to link to (For" and have them senth, that you want to beck the Create or Edit

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 65/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

The Create Hyperlink Dialog Box should appear, as below. Choose the World Wide Webtab. Then make sure the Hyperlink Type List Box is set to "http:" on the Hyperlink Type ListBox . Lastly, on the line titled URL type the address of the webpage. In this case we would typeout http://www.cnn.com. Click the OK and you have just created a link that should look andwork something like this link: CNN News.

To link your own pages together, you first need to determine how the pages are to beconnected. For example, you may want the viewer to click on the word "Hobbies", and have it goto a separate page of yours. To do this, follow the same directions as above: highlight the textand click the Create or Edit Hyperlink Icon on the toolbar.

The Create Hyperlink Dialog Box should appear, as below. Choose the World Wide Webtab. Next, select "(other)" for the Hyperlink Type: . On the URL line type the name of yourother page. In this case we would type "hobbies.htm". Once that is done you can click the OKand you will have created a link to another one of your pages.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 66/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Special Features

The one line text box allows you to add a box for interactive typing, such as the one below.

The scrolling text box allows you to add a scrolling text box for more information than a oneline text box can handle. This is a good way to ask for a great amount of information whileusing minimal space.

The check box allows you to add a box to gather information in a yes/no format.Please Vote for One Person

Jennifer

Jason

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 67/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Brian

The radio button box gives you the same capabilities as the check box only in a radio buttonform.Please Vote for One Teacher

Jim Levin

Sandy Levin

Michael Waugh

The drop down menu box allows you to give a list of choices in a compressed amount of space.Jennifer

Jason

The push button box allows you to add a button for different tasks: submit or reset.Submit Reset

The tools listed above are extremely useful because it allows you to add higher levelfeatures to your web page without having to know any type of coding.

Plug-insIn computing, a plug-in (or plug-in) is a set of software components that adds specific

capabilities to a larger software application. If supported, plug-ins enables customizing the

functionality of an application. For example, plug-ins is commonly used in web browsers to playvideo, scan for viruses, and display new file types. Well-known plug-ins examples includeAdobe Flash Player and QuickTime.Applications support plug-ins for many reasons. Some of the main reasons include:

• to enable third-party developers to create capabilities which extend an application• to support easily adding new features• to reduce the size of an application• to separate source code from an application because of incompatible software licenses

Specific examples of applications and why they use plug-ins:• Email clients use plug-ins to decrypt and encrypt email.• Graphics software use plug-ins to support file formats and process images (Adobe

Photoshop)• Media players use plug-ins to support file formats and apply filters

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 68/163

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 69/163

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 70/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

<DIV ALIGN="RIGHT"><P>President<BR>NeedItNow, Inc.<BR>Speedy, CO

</DIV></BODY>

</HTML>

The results appear in following figure:

On the other hand <SPAN> can be used to mark sections of text inline or text in the midst of theother text. For example:<HTML><HEAD>

<TITLE>Using the &lt;SPAN&gt; tag

</TITLE></HEAD>

<BODY>This is <SPAN STYLE="font-style: italic">not</SPAN> going to do!

</BODY>

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 71/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

</HTML>

The result of this HTML appears in the following figure:

Specifying the Font - <FONT>The <FONT> tag lets you select the size, color and face of the text. For example:

<HTML><HEAD>

<TITLE>Using the FONT tag

</TITLE></HEAD><BODY>

<FONT SIZE=6 COLOR="RED" FACE="Arial">Here is some text.</FONT></BODY>

</HTML>The results appear in the following figure:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 72/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Setting the Base Font - <BASEFONT> This element sets the font for the default text enclosed in the element, replacing the default fontused by the browser. You can specify relative sizes with respect to this default font with the<FONT> tag. In the following example, I’m setting the base font size to 4 (possible values rangefrom 1 through 7), then temporarily increasing that size to 6 for one word with a <FONT> tag byadding 2 to the base font size.

<HTML><HEAD>

<BASEFONT SIZE=4><TITLE>

Using the BASEFONT tag</TITLE>

</HEAD><BODY>

Here is some <FONT SIZE="+2" COLOR="RED"FACE="Arial">bigger</FONT>text.

</BODY></HTML>

The results appear in the following figure:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 73/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Making Text Blink - <BLINK> This tag makes the text to blink. For example:

<HTML><HEAD>

<BASEFONT SIZE=4><TITLE>

Using the BLINK tag</TITLE>

</HEAD><BODY>

<BLINK> Happy New Year!!! </BLINK></BODY>

</HTML>The results appear in the figure given below:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 74/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Note:- This tag is not supported by all the browsers.

Creating Horizontal Rules - <HR>Draws a horizontal line to separate or group vertically. A horizontal rule is a horizontal line

that serves to break up a page or to group items together. Some of the attributes of this tag areALIGN, COLOR, NOSHADE, SIZE, STYLE and WIDTH.

Here is an example showing a number of ways to display and align horizontal rules:<HTML>

<HEAD><TITLE>

Using the &lt;HR&gt; tag</TITLE>

</HEAD><BODY>

Here is what &lt;Hr&gt; looks like:<HR><BR>Here is what &lt;HR ALIGN=LEFT WIDTH=80%&GT; looks like:<HR ALIGN=LEFT WIDTH=80%><BR>Here is what &lt;HR ALIGN=CENTER WIDTH=80%&GT; looks like:<HR ALIGN=CENTER WIDTH=80%><BR>Here is what &lt;HR ALIGN=RIGHT WIDTH=10&GT; looks like:<HR ALIGN=RIGHT WIDTH=10><BR>Here is what &lt;HR SIZE=10 NOSHADE&GT; looks like:<HR ALIGN=CENTER SIZE=10 NOSHADE>

</BODY></HTML>

Following figure shows the results:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 75/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Centering Text - <CENTER> This tag centers its enclosed text in the Web browser.Here is an example of <CENTER> at work centering multiline text:<HTML>

<HEAD><TITLE>

Using the &lt;CENTER&gt; tag</TITLE>

</HEAD><BODY>

<CENTER>As you can see.<BR>the &lt;CENTER&gt; tag<BR>can center multi-line text.

</CENTER></BODY>

</HTML>

The results are shown in the following figure:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 76/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Displaying Text In A Scrolling Marquee - <MARQUEE>This tag displays scrolling text in a “marquee” style. Some of the attributes of this tag are:

• ALIGN – Sets the alignment of the text relative to marquee. Its values can be TOP(default), MIDDLE or BOTTOM.

• BEHAVIOR – Sets how the text in the marquee should move.• SCROLL – (the default; text scrolls the marquee), SLIDE (text enters from one side and

stops at the other side), or ALTERNATE (text seems to bounce from one side to theother).

• BGCOLOR – Sets the background color for the marquee box.• DIR – Gives the direction of the text. Possible values: LTR: left to right text or table and

RTL: right to left text or table.• DIRECTION – Sets the direction the text should scroll. Can be LEFT (the default),

RIGHT, DOWN, or UP.

Here is an example showing various <MARQUEE> options at work:<HTML>

<HEAD><TITLE>

Using Marquee element</TITLE>

</HEAD>

<BODY><MARQUEE ALIGN="TOP" LOOP="INFINITE" BEHAVIOR="BOUNCE"

BGCOLOR="GREEN" DIRECTION="RIGHT"><H2>

Here's a marquee!</H2></MARQUEE>

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 77/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

<CENTER><H1>

Using Marquees</H1></CENTER>

<MARQUEE ALIGN="LEFT" LOOP="INFINITE" BEHAVIOR="SCROLL"BGCOLOR="RED" WEIGHT=40 WIDTH=300 DIRECTION="DOWN">

<H2>Here's another marquee!

</H2></MARQUEE>

<MARQUEE ALIGN="TOP" LOOP="INFINITE" BEHAVIOR="SLIDE"BGCOLOR="0000FF" WIDTH=100% DIRECTION="RIGHT">

<H2>Here's a marquee!

</H2></MARQUEE>

</BODY</HTML>

The results are shown below:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 78/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Images in Web Pages Adding an Image to a Web Page - <IMG> This tag inserts an image into a web page. Some of the attributes of this tag are:

SRC = "text string" SRC tells where to get the picture that should be put on the page. SRC is the one requiredattribute for <IMG ...>. For example, suppose that the GIF file "../graphics/pumpkin.gif" is in thesame directory as this page.

ALT (text)The "alt" attribute defines an alternate text designed to be a textual replacement for objects thatare usually not supported by some browsers. It also serves as additional information for browsersthat do support these objects (images, forms and applets). Browsers may display this text as atool tip when the mouse is over the object.

ALIGNThis attribute specifies the alignment of the element. These three values set the element'sposition with respect to the surrounding text.

• bottom: Means that the bottom of the object should be vertically aligned with the currentbaseline. This is the default value.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 79/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

• middle: Means that the center of the object should be vertically aligned with the currentbaseline.

• top: Means that the top of the object should be vertically aligned with the top of thecurrent text line.

These two values set the position of a floating element:• left: Cause the image to float to the current left margin.• right: Cause the image to float to the current right margin.

WIDTH (length)Assigns a width to the element.

HEIGHT(length)Assigns a height to the element.

BORDER (pixels)Specifies the element's border width.

HSPACE (pixels)This attribute works as a margin for the element, defining the amount of white space to beinserted at the left and right sides of the element.

VSPACE (pixels)This attribute works as a margin for the element, defining the amount of white space to beinserted at the top and bottom sides of the element.

<HTML><BODY>

<H2>Norwegian Mountain Trip</H2><IMG BORDER="0" SRC="/images/pulpit.jpg" ALT="Pulpit rock" WIDTH="304"

HEIGHT="228" >

</BODY></HTML>The result is shown below:

Norwegian Mountain Trip

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 80/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Creating ListsLists let you display information in a compact and tight format. There are three kinds of lists:

• Unordered Lists • Ordered Lists • Definition Lists

Unordered Lists You can create unordered lists with elements like <UL> . Each item in the list gets its ownelement using the <LI> list item tag. Here is an example showing how to create a bulleted list:

<HTML><HEAD><TITLE>

An Unordered List</TITLE>

</HEAD><BODY>

<H1 ALIGN=CENTER>Creating an Unordered List</H1>Here are some items to consider when buying a computer:

<UL><LI> Speed<LI> Cost<LI> RAM

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 81/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

<LI> Disk Space<LI> CD ROM Speed

</UL></BODY>

</HTML>

The result is shown in the following figure:

Ordered Lists While unordered lists display a simple bullet before each list item, ordered lists use a

number system or alphabets to indicate that the items are ordered in some way. For example:<HTML>

<HEAD><TITLE>

An Ordered List</TITLE>

</HEAD><BODY>

<H1 ALIGN=CENTER>Creating an Ordered List

</H1>Here are some items to consider when buying a computer:<OL>

<LI> Speed

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 82/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

<LI> Cost<LI> RAM<LI> Disk Space<LI> CD ROM Speed

</UL></BODY>

</HTML>

The result is shown in the figure below:

Definition ListsThese lists include both terms and their definitions. <DL> element is used to create these lists,<DT> for terms, and <DD> for the definition of each term. For example:

<HTML><HEAD>

<TITLE>A Definition List

</TITLE></HEAD><BODY>

<H1 ALIGN=CENTER>Creating a Definition List

</H1>

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 83/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Here are some items to consider when buying a computer:<DL>

<DT> Speed <DD> CPU speed in Megahertz.<DT> Cost <DD> Make sure to keep this down.<DT> RAM <DD> Amount of memory in the computer.<DT> Disk Space <DD> Get plenty of Gigabytes.<DT> CD ROM Speed <DD> Get at least 24X

</DL></BODY>

</HTML>

The result is shown below:

Creating Tables<TABLE> element is used to create tables. It encloses elements like <CAPTION>, <TR>,<TH>, <TD>, <COLSPAN>, <COL>, <THEAD>, <TBODY> etc.

Creating a basic table The basic structure of an HTML table consists of the following tags:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 84/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

• Table tags: <TABLE> </TABLE> • Row tags: <TR> </TR>• Cell tags: <TD> </TD>

Constructing an HTML table consists of describing the table between the beginning tabletag, <TABLE> , and the ending table tag, </TABLE> . Between these tags, you then constructeach row and each cell in the row. To do this, you would first start the row with the beginningrow tag, <TR> , and then build the row by creating each cell with the beginning cell tag, <TD> ,adding the data for that cell, and then closing the cell with the ending cell tag, </TD> . When youfinish all of the cells for a row, you would then close the row with the ending rowtag, </TR> .Then, for each new row, you would repeat the process of beginning the row, buildingeach cell in the row, and closing the row.

The following table is an example of a basic table with three rows and two columns ofdata.

Data 1 Data 2Data 3 Data 4Data 5 Data 6

The codes that generated this table look like this:<TABLE>

<TR><TD> Data 1 </TD>

<TD> Data 2 </TD></TR><TR>

<TD> Data 3 </TD><TD> Data 4 </TD>

</TR><TR>

<TD> Data 5 </TD><TD> Data 6 </TD>

</TR></TABLE>

This table contains no border, title, or headings. If you wish to add any of these elementsto your table, you need to include additional HTML codes.

Adding a border, title, and headings

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 85/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

In addition to the basic table tags, several options are available for adding additionalelements to your table. For example, if you add a border, title, and column headings to the tablein the previous section, the table would then resemble the following:

TABLE TITLE Column A Column B

Data 1 Data 2Data 3 Data 4

Data 5 Data 6

The following codes generated the border, TABLE TITLE, and Column A and Column B

headings for this table:<TABLE BORDER="5"><TR>

<TH COLSPAN="2"><H3><BR> TABLE TITLE </H3></TH>

</TR><TH> Column A </TH><TH> Column B </TH>

Notice that the beginning table tag, <TABLE> , now includes the border

tag, BORDER="5" , which places a border around the table and frames each cell. The numberthat you ascribe to the border tag, BORDER= n, sets the width of the table border. Depending onhow you design your table, you can then determine the border size that best suits your table andthe overall design of your web page.

To add a title to your table, you would place the title and the attributes of that title betweenthe row commands, <TR> and </TR> . The heading codes, <TH> and </TH> , define a headingcell and, by default, these codes center the heading and set it in bold type. However, if you wantthe title to span across the columns below it, you need to include the COLSPAN= n code. Sincethis table has two columns, the COLSPAN="2" code was necessary. To add emphasis to theheader, you can use the header commands to make the text larger. In this table, notice thatthe <H3> and </H3> commands made the title larger. Finally, the <BR> tag created a spaceabove the title.

The individual column headings are also described by the headingcodes, <TH> and </TH> . Since these codes, by default, center the heading and set it in boldtype, no additional commands or attributes were included in the heading commands.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 86/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Polishing your tableTo give your table a more polished look, you can include commands that will adjust the

size of your table, add space in the cell, add space between rows, and align the data in a cell.Working with these commands is basically a process of trial and error to create the mostappealing presentation of your information. The type of table that you create and the overalldesign of your web site will help you determine what works best for your table.

Some of the commands that enable you to customize your table include:• The WIDTH= n% command sets the width of your table as a percentage of the screen.

The letter n designates the percentage that you assign to this command. For example, ifyou want the width of your table to be one half the width of the screen, you wouldinclude the WIDTH="50%" command in the beginning table command.

• The CELLPADDING= n command adjusts the vertical dimension of the cells. Theletter n designates the numerical value that you assign to this command.

• The CELLSPACING= n command sets the space or border around the cells. Theletter n designates the numerical value that you assign to this command.

• The ALIGN= (LEFT, RIGHT, or CENTER) command will horizontally align the data ina cell. For example, if you wish to place the data in the center of each cell in a row, youwould include the ALIGN=CENTER command within the row command.

• The VALIGN= (TOP, MIDDLE, or BOTTOM) command will vertically align the data ina cell. For example, if you wish to place the data in the center of each cell in a row, youwould include the ALIGN=MIDDLE command within the row command.

TABLE TITLE

Column A Column B

Data 1 Data 2

The following codes, along with codes previously discussed, created this table:<TABLE BORDER="5" WIDTH="50%" CELLPADDING="4"CELLSPACING="3">

<TR><TH COLSPAN="2"><BR><H3> TABLE TITLE </H3></TH>

</TR>

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 87/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

<TR><TH> Column A </TH><TH> Column B </TH>

</TR><TR ALIGN="CENTER">

<TD> Data 1 </TD><TD> Data 2 </TD>

</TR></TABLE>

Notice that the TABLE command now includes the WIDTH="50%" command. Thiscommand extends the table across one half of the width of the text. Also,the CELLPADDING="4" command increases the vertical dimension of the cells, andthe CELLSPACING="3" command increases the border around the cells. Finally,the ALIGN="CENTER" command places Data 1 and Data 2 in the center of the cell.

Working with Frames Simply put, a frame is a web browser window within another web browser window. By

using frames, you can create web pages consisting of multiple windows.Frames are related to one another in a manner determined by you, the web page author. For

example, you can set up your web page so that a link in a frame will call up a page in the sameframe, another frame, or the entire browser window.

Creating the framesLet's suppose you want to create a web page consisting of two frames. The frame on the

left will contain a list of services. When you select a service, a corresponding description willthen appear in the right frame. Following figure shows a sample page:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 88/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

To create a page such as this, you first need to set up your main page or index.html file toaccommodate frames.

There are two HTML tags used for frames: <FRAMESET> and <FRAME> . The<FRAMESET> tag sets the width of each frame as a percentage of the total width of the webpage. The <FRAME> tag assigns a name to each frame and indicates which file it will display.Here is a sample index.html file that creates a web page with two frames. Note that the <Body>tag normally found in HTML files is not needed.

<HTML><HEAD>

<TITLE> Computer Services </TITLE></HEAD><FRAMESET COLS=" 30%,70% "><FRAME scrolling= yes SRC="links.html" NAME=" left"><FRAME SRC=" intro.html " NAME=" right"></FRAMESET>

</HTML>

The FRAMESET COLS code sets up the frame size starting from left to right. So fromthis example, you can see that the left frame will take up 30% of the page's width and the rightframe will take up 70% of the page's width.

Next, the FRAME code indicates:• whether or not a scroll bar will automatically appear with the frame,• the content that will appear in the frame by indicating the filename, and

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 89/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

• the name of the frame.

In this case, the left frame will automatically contain a scroll bar, indicated by the FRAMESCROLLING=YES code. This frame will display the file called links.html , indicated by thesource code shown as SRC . Finally, the NAME code indicates that the frame is appropriatelycalled left .

The right frame will not automatically contain a scroll bar since the SCROLLING code isnot included. (A scrolling bar will appear, however, if it is needed.) This frame will display thefile called intro.html and the name of this frame is right. Note that the even though the example uses the NAME code, assigning names to the frames isnot required. It is helpful, however, to include it because the names give you as an easy way toindicate in which frame you wish to target information.

So to recap, our sample code indicates that the file intro.html will contain introductorymaterial and will appear in the right frame when the web page opens. No frame codes are neededin the intro.html file since it is simply an html file that displays in the right frame. A sampleintro.html file might look like this:

<HTML><HEAD>

<TITLE> Computer Services </TITLE></HEAD><BODY><P align=Center><IMG SRC=" deptbanner.GIF "><H1><Center> Computer Services </Center></H1><H3><Center> Introduction </Center></H3><P align=Center>

The Computer Services Department is responsible for supporting all thecompany's computers and networks and providing information services such ascomputer seminars, technical documentation, and publications.

</BODY></HTML>

Now that you have the information that will automatically open in the right frame, you cancontinue by creating a file for the left frame.

Targeting information

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 90/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

The left frame will contain a file called links.html which will include links to other pages.When someone clicks on a link, however, you can set it up so that the information appears in theright frame.

To target information to the right frame, you must include the proper codes as shown in theexample file below:

<HTML><HEAD>

<TITLE> Computer Services </TITLE></HEAD><BODY>

<H3> Computer Services Topics </H3><P ALIGN=left><A HREF=" intro.html " target="right"> Introduction </A> <P><A HREF=" helpdesk.html " target="right"> Help Desk </A> <P><A HREF=" seminars.html " target="right"> Seminars </A> <P>

</BODY></HTML>

In the sample code, you can see the standard A HREF code is used to create a link. Thislinking code also contains the target code which indicates where you want to display theinformation. Our sample file is set up so that when someone selects a link, the resulting fileappears in the right frame. This is evident by the fact that the target tag is set to "right," which isthe name you assigned to the right frame in the index.html file. In addition, note that thefile intro.html appears not only when the web page opens, but also when you click on thelink Introduction in the left frame. It also assumes that you have created a helpdesk.html fileand a seminars.html file with all the relevant information.

Linking to other web pagesBesides linking to your own HTML files, you can also set the links in your frame to other

pages on the web. To do this, you would indicate the URL instead of a filename as in thefollowing example:

<A HREF=" http://www.cnn.com " target="right">

Keep in mind, however, that if you set the link to a page that also has frames, the entirepage will be shown in the target frame, and you will have frames within frames. To avoid this,

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 91/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

don't set the link to appear in a frame. Instead, have it appear in its own window by eliminatingthe target tag as in this example:

<A HREF=" http://www.cnn.com ">

JavaScript LanguageWhat is JavaScript?

• JavaScript was designed to add interactivity to HTML pages• JavaScript is a scripting language• A scripting language is a lightweight programming language• JavaScript is usually embedded directly into HTML pages• JavaScript is an interpreted language (means that scripts execute without preliminary

compilation)

What's the difference between JavaScript and Java?Actually, the 2 languages have almost nothing in common except for the name. Although

Java is technically an interpreted programming language, it is coded in a similar fashion to C++,with separate header and class files, compiled together prior to execution. It is powerful enoughto write major applications and insert them in a web page as a special object called an "applet."Java is not considered an easy-to-use language for non-programmers.

Javascript is much simpler to use than Java. With Javascript, if I want check a form forerrors; I just type an if-then statement at the top of my page. No compiling, no applets, just asimple sequence.

What can a JavaScript do?• JavaScript gives HTML designers a programming tool - HTML authors are normally

not programmers, but JavaScript is a scripting language with a very simple syntax!Almost anyone can put small "snippets" of code into their HTML pages

• JavaScript can put dynamic text into an HTML page - A JavaScript statement likethis: document.write("<h1>" + name + "</h1>") can write a variable text into an HTMLpage

• JavaScript can react to events - A JavaScript can be set to execute when somethinghappens, like when a page has finished loading or when a user clicks on an HTMLelement

• JavaScript can read and write HTML elements - A JavaScript can read and change thecontent of an HTML element

• JavaScript can be used to validate data - A JavaScript can be used to validate formdata before it is submitted to a server. This saves the server from extra processing

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 92/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

• JavaScript can be used to detect the visitor's browser - A JavaScript can be used todetect the visitor's browser, and - depending on the browser - load another pagespecifically designed for that browser

• JavaScript can be used to create cookies - A JavaScript can be used to store andretrieve information on the visitor's computer

How to Insert a JavaScript into an HTML documentThe HTML <script> tag is used to insert a JavaScript into an HTML page.

Writing to The HTML DocumentThe example below writes a <p> element with current date information to the HTML document:

<HTML><BODY>

<H1>My First Web Page</H1><SCRIPT TYPE="text/javascript">

document.write("Hello World!”);</SCRIPT>

</BODY></HTML>

The results are shown below:

To insert a JavaScript into an HTML page, we use the <SCRIPT> tag. Inside the<SCRIPT> tag we use the TYPE attribute to define the scripting language. So, the <SCRIPTTYPE="text/javascript"> and </SCRIPT> tells where the JavaScript starts and ends.

JavaScript StatementsUnlike HTML, JavaScript is case sensitive .

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 93/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

A JavaScript statement is a command to a browser. The purpose of the command is to tell thebrowser what to do.Following JavaScript statement tells the browser to write "Hello World!" to the web page:document.write("Hello World!");

JavaScript VariablesVariables are "containers" for storing information. Rules for JavaScript variable names:

• Variable names are case sensitive (y and Y are two different variables)• Variable names must begin with a letter or the underscore character

Note: Because JavaScript is case-sensitive, variable names are case-sensitive.

Declaring JavaScript VariablesYou declare JavaScript variables with the var keyword:var x;var carname;After the declaration shown above, the variables are empty (they have no values yet).However, you can also assign values to the variables when you declare them:var x=5;var carname="Volvo";

JavaScript OperatorsJavaScript Arithmetic OperatorsArithmetic operators are used to perform arithmetic between variables and/or values. Followingtable lists arithmetic operators available in JavaScript:

Operator Description

+ Addition

- Subtraction

* Multiplication

/ Division

% Modulus (division remainder)

++ Increment

-- Decrement

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 94/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

JavaScript Assignment OperatorsAssignment operators are used to assign values to JavaScript variables. Following table listsassignment operators:

Operator Example Same As

= x=y

+= x+=y x=x+y

-= x-=y x=x-y

*= x*=y x=x*y

/= x/=y x=x/y

%= x%=y x=x%y

The + Operator Used on StringsThe + operator can also be used to add string variables or text values together. To add two ormore string variables together, use the + operator. For example:txt1="What a very";txt2="nice day";txt3=txt1+txt2;After the execution of the statements above, the variable txt3 contains "What a very nice day".

JavaScript Comparison and Logical OperatorsComparison Operators

Comparison operators are used in logical statements to determine equality or difference

between variables or values. Given that x=5 , the table below explains the comparison operators:

Operator Description Example

== is equal to x==8 is false

=== is exactly equal to (value and type) x===5 is truex==="5" is false

!= is not equal x!=8 is true

> is greater than x>8 is false

< is less than x<8 is true

>= is greater than or equal to x>=8 is false

<= is less than or equal to x<=8 is true

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 95/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Comparison operators can be used in conditional statements to compare values and takeaction depending on the result. For example:if (age<18) document.write("Too young");

Logical OperatorsLogical operators are used to determine the logic between variables or values.Given that x=6 and y=3 , the table below explains the logical operators:

Operator Description Example

&& and (x < 10 && y > 1) is true

|| or (x==5 || y==5) is false

! not !(x==y) is true

Conditional OperatorJavaScript also contains a conditional operator that assigns a value to a variable based on somecondition.Syntaxvariablename= (condition)?value1:value2

Examplegreeting=(visitor=="PRES")?"Dear President ":"Dear ";If the variable visitor has the value of "PRES", then the variable greeting will be assigned thevalue "Dear President " else it will be assigned "Dear".

JavaScript If...Else StatementsConditional StatementsConditional statements are used to perform different actions based on different conditions.

In JavaScript we have the following conditional statements:• if statement - use this statement to execute some code only if a specified condition is true• if...else statement - use this statement to execute some code if the condition is true and

another code if the condition is false• if...else if....else statement - use this statement to select one of many blocks of code to be

executed•

switch statement - use this statement to select one of many blocks of code to be executed

If StatementUse the if statement to execute some code only if a specified condition is true.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 96/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Syntax:if (condition){code to be executed if condition is true}

Example:<HTML>

<BODY>

<SCRIPT TYPE="text/javascript">var d = new Date();var time = d.getHours();if (time > 10){

document.write("<b>Good morning</b>");}</SCRIPT><P>This example demonstrates the If statement.</P><P>If the time on your browser is less than 10, you will get a "Good morning"greeting.</P>

</BODY></HTML>

Result is shown below:

If...else if...else Statement

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 97/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Use the if....else if...else statement to select one of several blocks of code to be executed.Syntax:if (condition1){

code to be executed if condition1 is true}

else if (condition2){code to be executed if condition2 is true

}else{

code to be executed if condition1 and condition2 are not true}

Example:<HTML>

<BODY><SCRIPT TYPE="text/javascript">var d = new Date();var time = d.getHours();if (time<10){

document.write("<b>Good morning</b>");}

else if (time>=10 && time<16){

document.write("<b>Good day</b>");}

else{

document.write("<b>Hello World!</b>");}

</SCRIPT><P>This example demonstrates the if..else if...else statement.</P>

</BODY></HTML>

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 98/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

The result is shown below:

The JavaScript Switch StatementUse the switch statement to select one of many blocks of code to be executed.Syntax:switch(n){

case 1:execute code block 1break;

case 2:execute code block 2break;

default:code to be executed if n is different from case 1 and 2

}

Example:<HTML>

<BODY><SCRIPT TYPE="text/javascript">var d=new Date();var theDay=d.getDay();switch (theDay){

case 5:document.write("<b>Finally Friday</b>");

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 99/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

break;case 6:

document.write("<b>Super Saturday</b>");break;

case 0:document.write("<b>Sleepy Sunday</b>");break;

default:document.write("<b>I'm really looking forward to this

weekend!</b>");}

</SCRIPT>

<P>This JavaScript will generate a different greeting based on what day it is. Notethat Sunday=0, Monday=1, Tuesday=2, etc.</P>

</BODY></HTML>

The result is shown in the figure below:

JavaScript Popup BoxesJavaScript has three kinds of popup boxes: Alert box, Confirm box, and Prompt box.

Alert Box

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 100/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

An alert box is often used if you want to make sure information comes through to the user.When an alert box pops up, the user will have to click "OK" to proceed.Syntax alert(" sometext ");

Example:<HTML>

<HEAD><SCRIPT TYPE="text/javascript">

function show_alert(){

alert("Hello! I am an alert box!");}

</SCRIPT></HEAD><BODY>

<INPUT TYPE="button" onclick="show_alert()" VALUE="Show alert box" />

</BODY></HTML>

The result is shown in the following figure:

Confirm BoxA confirm box is often used if you want the user to verify or accept something.

When a confirm box pops up, the user will have to click either "OK" or "Cancel" to proceed.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 101/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

If the user clicks "OK", the box returns true. If the user clicks "Cancel", the box returns false.Syntax: confirm(" sometext ");

Example:<HTML>

<HEAD><SCRIPT TYPE="text/javascript">

function show_confirm(){

var r=confirm("Press a button!");if (r==true){

alert("You pressed OK!");}

else{

alert("You pressed Cancel!");}

}</SCRIPT>

</HEAD><BODY>

<INPUT TYPE="button" onclick="show_confirm()" VALUE="Show a confirmbox" />

</BODY></HTML>

The result is shown below:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 102/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Prompt BoxA prompt box is often used if you want the user to input a value before entering a page.

When a prompt box pops up, the user will have to click either "OK" or "Cancel" to proceed afterentering an input value.

If the user clicks "OK" the box returns the input value. If the user clicks "Cancel" the boxreturns null.Syntax: prompt(" sometext ","defaultvalue ");

Example: <HTML>

<HEAD><SCRIPT TYPE="text/javascript">

function show_prompt(){

var name=prompt("Please enter your name","Harry Potter");if (name!=null && name!=""){

document.write("Hello " + name + "! How are you today?");}

}</SCRIPT>

</HEAD><BODY>

<INPUT TYPE="button" onclick="show_prompt()" value="Show prompt box" />

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 103/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

</BODY></HTML>

The result is shown in the following figure:

JavaScript FunctionsTo keep the browser from executing a script when the page loads, you can put your script

into a function. A function contains code that will be executed by an event or by a call to thefunction. You may call a function from anywhere within a page (or even from other pages if thefunction is embedded in an external .js file). Functions can be defined both in the <HEAD> andin the <BODY> section of a document. However, to assure that a function is read/loaded by thebrowser before it is called, it could be wise to put functions in the <HEAD> section.

How to Define a FunctionSyntax:function functionname (var1,var2,...,varX ){some code}

The parameters var1, var2, etc. are variables or values passed into the function. The {andthe} defines the start and end of the function.

Example:

<HTML>

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 104/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

<HEAD><SCRIPT TYPE="text/javascript">

function displaymessage(){

alert("Hello World!");}

</SCRIPT></HEAD>

<BODY><FORM>

<INPUT TYPE="button" VALUE="Click me!" ONCLICK="displaymessage()"/></FORM></BODY>

</HTML>

Following figure shows the result:

JavaScript LoopsOften when you write code, you want the same block of code to run over and over again in

a row. Instead of adding several almost equal lines in a script we can use loops to perform a tasklike this.

Loops execute a block of code a specified number of times, or while a specified conditionis true. In JavaScript, there are two different kinds of loops:

• for - loops through a block of code a specified number of times• while - loops through a block of code while a specified condition is true

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 105/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

The for LoopThe for loop is used when you know in advance how many times the script should run.Syntax for (variable =startvalue ;variable <=endvalue ;variable =variable +increment ){code to be executed}

Example The example below defines a loop that starts with i=0. The loop will continue to run as

long as i is less than, or equal to 5. i will increase by 1 each time the loop runs.

<HTML><BODY>

<SCRIPT TYPE="text/javascript">for (i = 0; i <= 5; i++){

document.write("The number is " + i);document.write("<br />");

}</SCRIPT><P>Explanation:</P><P>This for loop starts with i=0.</P>

<P>As long as <B>i</B> is less than, or equal to 5, the loop will continue to run.</P><P><B>i</B> will increase by 1 each time the loop runs.</P>

</BODY></HTML>

Following figure shows the result:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 106/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

The while LoopThe while loop loops through a block of code while a specified condition is true.Syntax:

while ( variable <=endvalue ){

code to be executed}

Example:The example below defines a loop that starts with i=0. The loop will continue to run as long

as i is less than, or equal to 5. i will increase by 1 each time the loop runs:

<HTML><BODY>

<SCRIPT TYPE="text/javascript">i=0;while (i<=5){

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 107/163

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 108/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Example:The example below uses a do...while loop. The do...while loop will always be executed at

least once, even if the condition is false, because the statements are executed before the conditionis tested:<HTML>

<BODY><SCRIPT TYPE="text/javascript">i = 0;do{

document.write("The number is " + i);document.write("<br />");i++;

}while (i <= 5)</SCRIPT>

</BODY></HTML>

Result:

The break Statement

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 109/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

The break statement will break the loop and continue executing the code that follows afterthe loop (if any).

Example:<HTML>

<BODY><SCRIPT TYPE="text/javascript">var i=0;for (i=0;i<=10;i++){

if (i==3){

break;}document.write("The number is " + i);document.write("<br />");

}</SCRIPT><P>Explanation: The loop will break when i=3.</P>

</BODY></HTML>

Result:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 110/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

The continue StatementThe continue statement will break the current loop and continue with the next value.

Example:<HTML>

<BODY><SCRIPT TYPE="text/javascript">var i=0for (i=0;i<=10;i++){

if (i==3){

continue;}document.write("The number is " + i);document.write("<br />");

}</SCRIPT>

</BODY></HTML>

Result:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 111/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Client-Side Programming in JavaScriptUsing JavaScript and forms

Creating the formThere are few differences between a straight HTML form and a JavaScript-enhanced form.

The main one being that a JavaScript form relies on one or more event handlers, such as onClick

or onSubmit. These invoke a JavaScript action when the user does something in the form, likeclicking a button. The event handlers, which are placed with the rest of the attributes in theHTML form tags, are invisible to a browser that does not support JavaScript. Because of thistrait, you can often use one form for both JavaScript and non-JavaScript browsers.

Typical form control objects -- also called "widgets" -- include the following:• Text box for entering a line of text• Push button for selecting an action• Radio buttons for making one selection among a group of options• Check boxes for selecting or deselecting a single, independent option

For example:<FORM NAME="myform" ACTION="" METHOD="GET">

Enter something in the box: <BR><INPUT TYPE="text" NAME="inputbox" VALUE=""><P>

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 112/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

<INPUT TYPE="button" NAME="button" Value="Click"onClick="testResults(this.form)">

</FORM>

• FORM NAME="myform" defines and names the form. Elsewhere in the JavaScriptyou can reference this form by the name myform . The name you give your form is up toyou, but it should comply with JavaScript's standard variable/function naming rules (nospaces, no weird characters except the underscore, etc.).

• ACTION="" defines how you want the browser to handle the form when it is submittedto a CGI program running on the server. As this example is not designed to submitanything, the URL for the CGI program is omitted.

• METHOD="GET" defines the method data is passed to the server when the form issubmitted. In this case the attribute is puffer as the example form does not submitanything.

• INPUT TYPE="text" defines the text box object. This is standard HTML markup.• INPUT TYPE="button" defines the button object. This is standard HTML markup

except for the onClick handler.• onClick="testResults(this.form)" is an event handler -- it handles an event, in this case

clicking the button. When the button is clicked, JavaScript executes the expression withinthe quotes. The expression says to call the testResults function elsewhere on the page,and pass to it the current form object.

Getting a value from a form objectHere's the full script you can try as you experiment with obtaining values from form

objects. Load the page, then type something into the text box. Click the button, and what youtyped is shown in the alert box.<HTML>

<HEAD><TITLE>Test Input</TITLE>

<SCRIPT LANGUAGE="JavaScript">function testResults (form) {var TestVar = form.inputbox.value;alert ("You typed: " + TestVar);}</SCRIPT>

</HEAD><BODY><FORM NAME="myform" ACTION="" METHOD="GET">Enter something in the

box: <BR>

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 113/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

<INPUT TYPE="text" NAME="inputbox" VALUE=""><P><INPUT TYPE="button" NAME="button" Value="Click"

onClick="testResults(this.form)"></FORM></BODY>

</HTML>

The following figure shows the result of the above script:

Here's how the script works. JavaScript calls the testResults function when you click thebutton in the form. The testResults function is passed to the form object using thesyntax this.form (the this keyword references the button control; form is a property of the buttoncontrol and represents the form object). I've given the form object the name form inside thetestResult function, but you can any name you like.

The testResults function is simple -- it merely copies the contents of the text box to avariable named TestVar. Notice how the text box contents were referenced. I defined the formobject I wanted to use (called form ), the object within the form that I wanted (called inputbox ),and the property of that object I wanted (the value property).Setting a value in a form object

The value property of the input box, shown in the above example, is both readable andwritable. That is, you can read whatever is typed into the box, and you can write data back intoit. The process of setting the value in a form object is just the reverse of reading it. Here's a shortexample to demonstrate setting a value in a form text box. The process is similar to the previousexample, except this time there are two buttons. Click the "Read" button and the script reads

what you typed into the text box. Click the "Write" button and the script writes a particularlylurid phrase into the text box.set_formval.html<HTML>

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 114/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

<HEAD><TITLE>Test Input </TITLE><SCRIPT LANGUAGE="JavaScript">

function readText (form) {TestVar =form.inputbox.value;alert ("You typed: " + TestVar);

}

function writeText (form) {form.inputbox.value = "Have a nice day!"

}</SCRIPT>

</HEAD><BODY>

<FORM NAME="myform" ACTION="" METHOD="GET">Enter something in the box: <BR><INPUT TYPE="text" NAME="inputbox" VALUE=""><P><INPUT TYPE="button" NAME="button1" Value="Read"

onClick="readText(this.form)"><INPUT TYPE="button" NAME="button2" Value="Write"

onClick="writeText(this.form)"></FORM>

</BODY></HTML>The result is shown in the figure below:

• When you click the "Read" button, JavaScript calls the readText function, which readsand displays the value you entered into the text box.

• When you click the "Write" button, JavaScript calls the writeText function, whichwrites "Have a nice day!" in the text box.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 115/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Reading other form object valuesThe text box is perhaps the most common form object you'll read (or write) using

JavaScript. However, you can use JavaScript to read and write values from most other objects(note that JavaScript cannot currently be used to read or write data using the password text box).In addition to text boxes, JavaScript can be used with:

• Hidden text box (TYPE="hidden").• Radio button (TYPE="radio")• Check box (TYPE="checkbox")• Text area (<TEXT AREA>)• Lists (<SELECT>)

Using Hidden Text Boxes

From a JavaScript standpoint, hidden text boxes behave just like regular text boxes, sharingthe same properties and methods. From a user standpoint, hidden text boxes "don't exist"because they do not appear in the form. Rather, hidden text boxes are the means by which specialinformation can be passed between server and client. They can also be used to hold temporarydata that you might want to use later. Because hidden text boxes are used like standard text boxesa separate example won't be provided here.

Using Radio ButtonsRadio buttons are used to allow the user to select one, and only one, item from a group of

options. Radio buttons are always used in multiples; there is no logical sense in having just oneradio button on a form, because once you click on it, you can't unclick it. If you want a simpleclick/unclick choice use a check box instead.

To define radio buttons for JavaScript, provide each object with the same name. JavaScriptwill create an array using the name you've provided; you then reference the buttons using thearray indexes. The first button in the series is numbered 0, the second is numbered 1, and soforth. Note that the VALUE attribute is optional for JavaScript-only forms. You'll want toprovide a value if you submit the form to a CGI program running on the server, however.<INPUT TYPE="radio" NAME="rad" VALUE="radio_button1" onClick=0><INPUT TYPE="radio" NAME="rad" VALUE="radio_button2" onClick=0><INPUT TYPE="radio" NAME="rad" VALUE="radio_button3" onClick=0><INPUT TYPE="radio" NAME="rad" VALUE="radio_button4" onClick=0>

Following is an example of testing which button is selected. The for loop in the testButtonfunction cycles through all of the buttons in the "rad" group. When it finds the button that'sselected, it breaks out of the loop and displays the button number (remember: starting from 0).form_radio.html

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 116/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

<HTML><HEAD>

<TITLE>Radio Button Test</TITLE><SCRIPT LANGUAGE="JavaScript">function testButton (form){

for (Count = 0; Count < 3; Count++) {if (form.rad[Count].checked)

break;}alert ("Button " + Count + " is selected");

}</SCRIPT>

</HEAD><FORM NAME="testform"><INPUT TYPE="button" NAME="button" Value="Click"

onClick="testButton(this.form)"> <BR><INPUT TYPE="radio" NAME="rad" Value="rad_button1" onClick=0><BR><INPUT TYPE="radio" NAME="rad" Value="rad_button2" onClick=0><BR><INPUT TYPE="radio" NAME="rad" Value="rad_button3" onClick=0><BR></FORM>

</HTML>

Result:

Setting a radio button selection with HTML is simple. If you want the form to initiallyappear with a given radio button selected, add the CHECKED attribute to the HTML markup forthat button:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 117/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

<INPUT TYPE="radio" NAME="rad" Value="rad_button1" CHECKED onClick=0>

You can also set the button selection programmatically with JavaScript, using the checkedproperty. Specify the index of the radio button array you want to checked.

form.rad[0].checked = true; // sets to first button in the rad group

Using Check BoxesCheck boxes are stand-alone elements; that is, they don't interact with neighboring

elements like radio buttons do. Therefore they are a bit easier to use. Using JavaScript you cantest if a check box is checked using the checked property, as shown here. Likewise, you can setthe checked property to add or remove the checkmark from a check box. In this example an alertmessage tells you if the first check box is checked. The value is true if the box is checked; falseif it is not.form_check.html<HTML>

<HEAD><TITLE>Checkbox Test</TITLE>

<SCRIPT LANGUAGE="JavaScript">function testButton (form){

alert (form.check1.checked);}</SCRIPT>

</BODY><FORM NAME="testform"><INPUT TYPE="button" NAME="button" Value="Click"

onClick="testButton(this.form)"><BR><INPUT TYPE="checkbox" NAME="check1" Value="Check1">Checkbox1 <BR><INPUT TYPE="checkbox" NAME="check2" Value="Check2">Checkbox2> <BR><INPUT TYPE="checkbox" NAME="check3" Value="Check3">Checkbox3 <BR>

</FORM></BODY>

</HTML>

Result:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 118/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

As with the radio button object, add a CHECKED attribute to the HTML markup for thatcheck box you wish to be initially checked when the form is first loaded.

<INPUT TYPE="checkbox" NAME="check1" Value="0" CHECKED>Checkbox 1>

You can also set the button selection programmatically with JavaScript, using the checkedproperty. Specify the name of the checkbox you want to check, as in

form.check1.checked = true;

Using Text AreasText areas are used for multiple-line text entry. The default size of the text box is 1 row by

20 characters. You can change the size using the COLS and ROWS attributes. Here's a typicalexample of a text area with a text box 40 characters wide by 7 rows:<TEXTAREA NAME="myarea" COLS="40" ROWS="7"></TEXTAREA>

You can use JavaScript to read the contents of the text area box. This is done with the valueproperty. Here is an example:form_textarea.html

<HTML><HEAD><TITLE>Text Area Test</TITLE><SCRIPT LANGUAGE="JavaScript">

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 119/163

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 120/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

tags. You can have any number of <OPTION> tags in a list. The list is terminated with a</SELECT> tag.

The list can appear with many items showing at once, or it can appear in a drop-down box -- normally you see one item at a time, but click to see more. The markup for the two styles isidentical, except for the optional SIZE attribute. Leave off SIZE to make a drop-down box; useSIZE to make a list box of the size you wish.

Use the selectedIndex property to test which option item is selected in the list, as shownin the following example. The item is returned as an index value, with 0 being the first option, 1being the second, and so forth (if no item is selected the value is -1).form_select.html<HTML>

<HEAD><TITLE>List Box Test</TITLE><SCRIPT LANGUAGE="JavaScript">function testSelect(form) {

alert (form.list.selectedIndex);}</SCRIPT>

</HEAD><BODY><FORM NAME="myform" ACTION="" METHOD="GET"><INPUT TYPE="button" NAME="button" Value="Test"

onClick="testSelect(this.form)"><SELECT NAME="list" SIZE="3"><OPTION>This is item 1<OPTION>This is item 2<OPTION>This is item 3</SELECT></FORM></BODY>

</HTML>

Result:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 121/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

If you want the text of the selected list item instead of the index, use this in the testSelectfunction:function testSelect (form) {

Item = form.list.selectedIndex;

Result = form.list.options[Item].text;alert (Result);

}

Other events you can trigger within a formI've used the onClick event handler in all of the examples because that's the one you are

most likely to deal with in your forms. Yet JavaScript supports a number of other event handlersas well. Use these as the need arises, and the mood fits. In Navigator 2.x The event handlers usedwith form object are:

• onFocus -- an event is triggered with a form object gets input focus (the insertion pointis clicked there).

• onBlur -- an event is triggered with a form object loses input focus (the insertion pointis clicked out of there).

• onChange -- an event is triggered when a new item is selected in a list box. This eventis also trigged with a text or text area box loses focus and the contents of the box haschanged.

• onSelect -- an event is triggered when text in a text or text area box is selected.• onSubmit -- an event is triggered when the form is submitted to the server (more about

this important hander later in the column).

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 122/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Submitting the form to the serverIn the examples above I've limited the action of the form to within JavaScript only. Many

forms are designed to send data back to a CGI program running on the server. This is referred toas submitting the form, and is accomplished using either of two JavaScript instructions: theonSubmit event handler or the submit method. In most instances, you use one or the other, notboth!

• Place the onSubmit event hander in the <FORM> tag. This tells JavaScript what itshould do when the user clicks the Submit button (this is a button defined asTYPE="submit").

• Place the submit instruction anywhere in your JavaScript. It can be activated by anyaction, such as clicking a form button that has been defined with the onClick eventhandler.

Using onSubmitHere's an example of using the onSubmit event handler to send mail. The onSubmit event

handler tells JavaScript what to do when the user clicks the Submit button: call the mailMe()function, where additional mail fields are appended to a mailto: URL. Navigator automaticallyopens a new mail window with the fields filled in. Write the body of the message, and send themail off to the recipient.onsubmit.html<HTML>

<HEAD><TITLE>onSubmit Test</TITLE><SCRIPT LANGUAGE="JavaScript">function mailMe(form){

Subject=document.testform.inputbox1.value;CC= document.testform.inputbox2.value;BCC= document.testform.inputbox3.value;location = "mailto:[email protected]?subject="+Subject+"&Bcc="+BCC+"&cc="+CC;return true;

}</SCRIPT></HEAD>

<BODY><FORM NAME="testform" onSubmit="return mailMe(this.form)" >Subject of message: <BR><INPUT TYPE="text" NAME="inputbox1" VALUE="This is such a great form!" SIZE=50><P>Send cc to: <BR>

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 123/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

<INPUT TYPE="text" NAME="inputbox2" VALUE="" SIZE=50><P>Send blind cc to: <BR><INPUT TYPE="text" NAME="inputbox3" VALUE="" SIZE=50><P><INPUT TYPE="submit"><BR></FORM></BODY></HTML>

Using submitIn the next example the submit method is used instead. The script is little changed, except

that the onSubmit handler is removed, and an onClick hander for a renamed form button is addedin its place. The submit() method replaces the return true statement in the previous example.submit.html<HTML>

<HEAD><TITLE>test</TITLE><SCRIPT LANGUAGE="JavaScript">function mailMe(form){

Subject=document.testform.inputbox1.valueCC= document.testform.inputbox2.valueBCC= document.testform.inputbox3.valuelocation = "/javaworld/cgi-bin/jw-

[email protected]?subject="+Subject+"&Bcc="+BCC+"&cc="+CCdocument.testform.submit();

}</SCRIPT></HEAD>

<BODY><FORM NAME="testform">Subject of message: <BR><INPUT TYPE="text" NAME="inputbox1" VALUE="This is such a great form!"SIZE=50><P>Send cc to: <BR><INPUT TYPE="text" NAME="inputbox2" VALUE="" SIZE=50><P>Send blind cc to: <BR><INPUT TYPE="text" NAME="inputbox3" VALUE="" SIZE=50><P><INPUT TYPE="button" VALUE="Send Mail" onClick="mailMe()"><BR></FORM></BODY></HTML>

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 124/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Server-Side Programming in JavaScriptWhat is Server-side Scripting?

Normally when a browser requests an HTML file, the server returns the file, but if the filecontains a server-side script, the script inside the HTML file is executed by the server before thefile is returned to the browser as plain HTML.

What is Server-side Scripting?Normally when a browser requests an HTML file, the server returns the file, but if the file

contains a server-side script, the script inside the HTML file is executed by the server before thefile is returned to the browser as plain HTML.

Server-side JavaScript (SSJS) refers to JavaScript that runs on server-side and is therefore notdownloaded to the browser. This term is used to differentiate it from regular JavaScript, which ispredominantly used on the client-side (also referred to as client-side JavaScript or CSJS forshort). The first implementation of SSJS was Netscape's LiveWire, which was included in theirEnterprise Server 2.0 back in 1996. Since then, a number of other companies have followed suitin offering an alternative to the usual server-side technologies. One of the biggest players in thefield was Microsoft. They supported the use of JavaScript on the server within what is nowknown as "classic" ASP. Along with the most common VBScript language, it also supportedJavaScript and PerlScript. In reality, Microsoft utilized JScript, their own version of JavaScript.To use JScript/JavaScript, all you had to do was set the LANGUAGE attribute in the openingscript tag:<%@LANGUAGE="JavaScript"%><%Response.Write("<HTML>\r")Response.Write("<FONT COLOR=\"red\">\"Hello World\"</FONT><BR>\r")Response.Write("</HTML>\r")%>

Since the code runs on the server, what is sent to the client is the output of the script ratherthan the source code. Hence only the tags produced by the Response.Write() functions are foundin the page source:<HTML><FONT COLOR="red">"Hello World"</FONT>< BR ></HTML>

In addition to alleviating development complexity, server-side JavaScript offers a few otherbenefits that you may not have considered:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 125/163

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 126/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

In the second stage, shown in Figure, a page in the application is requested by a clientbrowser. The runtime engine uses the application executable to look up the source page anddynamically generate the HTML page to return. It runs any server-side JavaScript statementsfound on the page. The result of those statements might add new HTML or client-side JavaScriptstatements to the HTML page. The run-time engine then sends the resulting page over thenetwork to the Navigator client, which runs any client-side JavaScript and displays the results.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 127/163

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 128/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

In contrast to standard Common Gateway Interface (CGI) programs, all JavaScript sourceis integrated directly into HTML pages, facilitating rapid development and easy maintenance.Server-side JavaScript's Session Management Service contains objects you can use to maintain

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 129/163

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 130/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

</SCRIPT><FORM>Required Field: <input type='text' id='req1'/><INPUT TYPE='button'

onclick="notEmpty(document.getElementById('req1'), 'Please Enter a Value')"VALUE='Check Field' />

</FORM>

Result:

Form Validation – Checking for All NumbersIf someone is entering a credit card, phone number, zip code, similar information you want

to be able to ensure that the input is all numbers. The quickest way to check if an input's stringvalue is all numbers is to use a regular expression /^[0-9]+$/ that will only match if the string isall numbers and is at least one character long.JavaScript Code:

// If the element's string matches the regular expression it is all numbersfunction isNumeric(elem, helperMsg){

var numericExpression = /^[0-9]+$/;if(elem.value.match(numericExpression)){

return true;}else{

alert(helperMsg);elem.focus();return false;

}}

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 131/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

What we're doing here is using JavaScript existing framework to have it do all the hardwork for us. Inside each string is a function called match that you can use to see if the stringmatches a certain regular expression. We accessed this function like so:elem.value.match(expressionhere).We wanted to see if the input's string was all numbers so we made a regular expression to checkfor numbers [0-9] and stored it as numericExpression. We then used the match function with our regular expression. If it is numeric then match willreturn true, making our if statement pass the test and our function isNumeric will also returntrue. However, if the expression fails because there is a letter or other character in our input'sstring then we'll display our helperMsg and return false.Working Example:<SCRIPT TYPE='text/javascript'>function isNumeric(elem, helperMsg){

var numericExpression = /^[0-9]+$/;if(elem.value.match(numericExpression)){

return true;}else{

alert(helperMsg);elem.focus();return false;

}}</SCRIPT><FORM>Numbers Only: <INPUT TYPE='text' id='numbers'/><INPUT TYPE='button'

onclick="isNumeric(document.getElementById('numbers'), 'Numbers Only Please')"value='Check Field' />

</FORM>

Result:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 132/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Form Validation – Checking for All LettersThis function will be identical to isNumeric except for the change to the regular expression

we use inside the match function. Instead of checking for numbers we will want to check for allletters. If we wanted to see if a string contained only letters we need to specify an expression thatallows for both lowercase and uppercase letters: /^[a-zA-Z]+$/ .Example:<SCRIPT TYPE='text/javascript'>function isAlphabet(elem, helperMsg){

var alphaExp = /^[a-zA-Z]+$/;if(elem.value.match(alphaExp)){

return true;}else{

alert(helperMsg);

elem.focus();return false;}

}</SCRIPT><FORM>Letters Only: <INPUT TYPE='text' id='letters'/><INPUT TYPE='button'

onclick="isAlphabet(document.getElementById('letters'), 'Letters Only Please')"value='Check Field' />

</FORM>

Result:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 133/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Form Validation – Checking for Numbers and Letters

By combining both theisAlphabet

andisNumeric

functions into one we can check to seeif a text input contains only letters and numbers.JavaScript Code:

// If the element's string matches the regular expression it is numbers and lettersfunction isAlphanumeric(elem, helperMsg){

var alphaExp = /^[0-9a-zA-Z]+$/;if(elem.value.match(alphaExp)){

return true;}else{

alert(helperMsg);elem.focus();return false;

}}

Form Validation – Restricting the LengthBeing able to restrict the number of characters a user can enter into a field is one of the best

ways to prevent bad data. For example, if you know that the zip code field should only be 5numbers you know that 2 numbers is not sufficient.

Below we have created a lengthRestriction function that takes a text field and twonumbers. The first number is the minimum number of characters and the second is the maximumnumber of characters the input can be. If you just want to specify an exact number then send thesame number for both minimum and maximum.JavaScript Code:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 134/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

function lengthRestriction(elem, min, max){var uInput = elem.value;if(uInput.length >= min && uInput.length <= max){

return true;}else{

alert("Please enter between " +min+ " and " +max+ " characters");elem.focus();return false;

}}Here's an example of this function for a field that requires 6 to 8 characters for a valid username.Example:<SCRIPT TYPE='text/javascript'>function lengthRestriction(elem, min, max){

var uInput = elem.value;if(uInput.length >= min && uInput.length <= max){

return true;}else{

alert("Please enter between " +min+ " and " +max+ " characters");elem.focus();return false;

}}</SCRIPT><FORM>Username(6-8 characters): <INPUT TYPE='text' id='restrict'/><INPUT TYPE='button'

onclick="lengthRestriction(document.getElementById('restrict'), 6, 8)"value='Check Field' />

</FORM>Result:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 135/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Form Validation – Selection MadeTo be sure that someone has actually selected a choice from an HTML select input you can

use a simple trick of making the first option as helpful prompt to the user and a red flag to youfor your validation code.

By making the first option of your select input something like "Please Choose" you canspur the user to both make a selection and allow you to check to see if the default option "PleaseChoose" is still selected when the submit the form.JavaScript Code:function madeSelection(elem, helperMsg){

if(elem.value == "Please Choose"){alert(helperMsg);elem.focus();return false;

}else

{ return true;}

}Working Example:<script type='text/javascript'>function madeSelection(elem, helperMsg){

if(elem.value == "Please Choose"){alert(helperMsg);elem.focus();return false;

}else{ return true;}

}

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 136/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

</script><form>Selection: <select id='selection'><option>Please Choose</option><option>CA</option><option>WI</option><option>XX</option></select><input type='button'

onclick="madeSelection(document.getElementById('selection'), 'Please ChooseSomething')"value='Check Field' /></form>Result:

Form Validation – Email Validation Every email is made up for 5 parts:1. A combination of letters, numbers, periods, hyphens, plus signs, and/or underscores2. The at symbol @3. A combination of letters, numbers, hyphens, and/or periods4. A period5. The top level domain (com, net, org, us, gov, ...)

Valid Examples:• [email protected]

[email protected][email protected] Examples:

• @deleted.net - no characters before the @

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 137/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

[email protected] - invalid character !• shoes@need_shining.com - underscores are not allowed in the domain name

The regular expression to check for all of this is a little overkill and beyond the scope ofthis tutorial to explain thoroughly. However, test it out and you'll see that it gets the job done.JavaScript Code:function emailValidator(elem, helperMsg){

var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;if(elem.value.match(emailExp)){

return true;}else{

alert(helperMsg);elem.focus();return false;

}}Working Example:<SCRIPT TYPE='text/javascript'>function emailValidator(elem, helperMsg){

var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;if(elem.value.match(emailExp)){

return true;}else{

alert(helperMsg);elem.focus();return false;

}}</SCRIPT><FORM>Email: <INPUT TYPE='text' id='emailer'/><INPUT TYPE='button'

onclick="emailValidator1(document.getElementById('emailer'), 'Not a Valid Email')"value='Check Field' />

</FORM>Result:

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 138/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Validating form data using JavaScript

If you've made it this far I commend you, but we're not done yet! The final step is to beable to perform all of these validation steps when the user is ready to submit their data.Each form has a JavaScript event called onSubmit that is triggered when its submit button

is clicked. If this even returns 0 or false then a form cannot be submitted, and if it returns 1 ortrue it will always be submitted. Wouldn't it be perfect if we could somehow make an ifstatement that said "If the form is valid submit it (1) else don't submit it (0)"? Well with amaster formValidator function we can do just that.

formValidator will be somewhat like a list of checks that we want to do before a form issubmitted. But before we can decide what we want to check for, we need to have our form!

HTML Form Code:

<form onsubmit='return formValidator()' >First Name: <input type='text' id='firstname' /><br />Address: <input type='text' id='addr' /><br />Zip Code: <input type='text' id='zip' /><br />State: <select id='state'>

<option>Please Choose</option><option>AL</option><option>CA</option><option>TX</option><option>WI</option>

</select><br />

Username(6-8 characters): <input type='text' id='username' /><br />Email: <input type='text' id='email' /><br /><input type='submit' value='Check Form' /><br /></form>

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 139/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

That's a lot of data to verify and the first thing we would probably want to check is thateach field was at least filled out. To check for completion we will ensure no fields are empty andthat the SELECT field has a selection. Here are the starting pieces of our master validationfunction formValidator. JavaScript Code:function formValidator(){

// Make quick references to our fieldsvar firstname = document.getElementById('firstname');var addr = document.getElementById('addr');var zip = document.getElementById('zip');var state = document.getElementById('state');var username = document.getElementById('username');var email = document.getElementById('email');

// Check each input in the order that it appears in the form!if(isAlphabet(firstname, "Please enter only letters for your name")){

if(isAlphanumeric(addr, "Numbers and Letters Only for Address")){if(isNumeric(zip, "Please enter a valid zip code")){

if(madeSelection(state, "Please Choose a State")){if(lengthRestriction(username, 6, 8)){

if(emailValidator(email, "Please enter a valid emailaddress")){

return true;}

}}

}}

}

return false;}

The first part of this function is where we create easy references to our HTML inputs usingthe getElementById function. These quick references will make our next block of code mucheasier to read!

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 140/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

The second part uses a bunch of embedded if statements to see whether or not each fieldhas the correct type of data. If every single one of those fields we check validates, then we'llreturn true and the form will be submitted successfully.

However, if just one of those if statements fails then the return false at the end of thefunction is reached and prevents the form for being submitted.

As you can see this function really does do quite a lot, definitely earning the titleof formValidator..

Now let's put all the necessary and HTML together and try it out!

All Together NowHTML & JavaScript Code:<SCRIPT TYPE='text/javascript'>function formValidator(){

// Make quick references to our fieldsvar firstname = document.getElementById('firstname');var addr = document.getElementById('addr');var zip = document.getElementById('zip');var state = document.getElementById('state');var username = document.getElementById('username');var email = document.getElementById('email');

// Check each input in the order that it appears in the form!if(isAlphabet(firstname, "Please enter only letters for your name")){

if(isAlphanumeric(addr, "Numbers and Letters Only for Address")){if(isNumeric(zip, "Please enter a valid zip code")){

if(madeSelection(state, "Please Choose a State")){if(lengthRestriction(username, 6, 8)){

if(emailValidator(email, "Please enter a valid emailaddress")){

return true;}

}}

}}

}return false;

}function notEmpty(elem, helperMsg){

if(elem.value.length == 0){

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 141/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

alert(helperMsg);elem.focus(); // set the focus to this inputreturn false;

}return true;

}function isNumeric(elem, helperMsg){

var numericExpression = /^[0-9]+$/;if(elem.value.match(numericExpression)){

return true;}else{

alert(helperMsg);elem.focus();return false;

}}function isAlphabet(elem, helperMsg){

var alphaExp = /^[a-zA-Z]+$/;if(elem.value.match(alphaExp)){

return true;}else{

alert(helperMsg);elem.focus();return false;

}}function isAlphanumeric(elem, helperMsg){

var alphaExp = /^[0-9a-zA-Z]+$/;if(elem.value.match(alphaExp)){

return true;}else{

alert(helperMsg);elem.focus();return false;

}}function lengthRestriction(elem, min, max){

var uInput = elem.value;if(uInput.length >= min && uInput.length <= max){

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 142/163

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 143/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Email: <INPUT TYPE='text' id='email' /><BR /><INPUT TYPE='submit' value='Check Form' /></FORM>Result:

XML BasicsWhat is XML?

• XML stands for EXtensible Markup Language • XML is a markup language much like HTML• XML was designed to carry data, not to display data• XML tags are not predefined. You must define your own tags• XML is designed to be self-descriptive• XML is a W3C Recommendation

The Difference between XML and HTMLXML is not a replacement for HTML.XML and HTML were designed with different goals:

• XML was designed to transport and store data, with focus on what data is• HTML was designed to display data, with focus on how data looks

HTML is about displaying information, while XML is about carrying information.

With XML You Invent Your Own Tags

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 144/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

That is because the XML language has no predefined tags. The tags used in HTML arepredefined. HTML documents can only use tags defined in the HTML standard (like <p>, <h1>,etc.). XML allows the author to define his/her own tags and his/her own document structure.XML is Not a Replacement for HTMLXML is a complement to HTML.

It is important to understand that XML is not a replacement for HTML. In most webapplications, XML is used to transport data, while HTML is used to format and display the data.

XML Separates Data from HTMLIf you need to display dynamic data in your HTML document, it will take a lot of work to

edit the HTML each time the data changes. With XML, data can be stored in separate XML files.This way you can concentrate on using HTML for layout and display, and be sure that changes inthe underlying data will not require any changes to the HTML. With a few lines of JavaScriptcode, you can read an external XML file and update the data content of your web page.

XML Simplifies Data SharingIn the real world, computer systems and databases contain data in incompatible formats.

XML data is stored in plain text format. This provides a software- and hardware-independentway of storing data. This makes it much easier to create data that can be shared by differentapplications.

XML Simplifies Data TransportOne of the most time-consuming challenges for developers is to exchange data between

incompatible systems over the Internet. Exchanging data as XML greatly reduces thiscomplexity, since the data can be read by different incompatible applications.

XML Simplifies Platform ChangesUpgrading to new systems (hardware or software platforms), is always time consuming.

Large amounts of data must be converted and incompatible data is often lost. XML data is storedin text format. This makes it easier to expand or upgrade to new operating systems, newapplications, or new browsers, without losing data.

XML Makes Your Data More AvailableDifferent applications can access your data, not only in HTML pages, but also from XML

data sources. With XML, your data can be available to all kinds of "reading machines"(Handheld computers, voice machines, news feeds, etc), and make it more available for blindpeople, or people with other disabilities.

XML is Used to Create New Internet Languages

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 145/163

8km milestone ,We&site ' ww

A lot of new Internet languagHere are some examples:

• XHTML• WSDL for describing• WAP and WML as m• RSS languages for ne• RDF and OWL for de• SMIL for describing

XML Documents Form a TXML documents must

elements. The elements in anand branches to the lowest leAll elements can have sub ele<root>

<child><subchild>.....</subchild>

</child></root>

The terms parent, chilelements. Parent elements haor sisters). All elements can hExample:

The image above represents o<bookstore><book category="COOKIN

World Institute Of Technologyohna Palwal Road , NH !" # ,Sohna , $urgaon ,%wit%net%in ( mail ' info)wi

s are created with XML.

available web servicesrkup languages for handheld devicess feedscribing resources and ontologyultimedia for the web

ee Structurecontain a root element . This element is "tXML document form a document tree. Th

el of the tree.ments (child elements):

d, and sibling are used to describe thee children. Children on the same level are c

ave text content and attributes (just like in H

ne book in the XML below:

">

Haryana%t%net%in

e parent" of all othertree starts at the root

relationships betweenlled siblings (brothersML).

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 146/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

<title lang="en">Everyday Italian</title><author>Giada De Laurentiis</author><year>2005</year><price>30.00</price>

</book><book category="CHILDREN"><title lang="en">Harry Potter</title><author>J K. Rowling</author><year>2005</year><price>29.99</price>

</book><book category="WEB"><title lang="en">Learning XML</title><author>Erik T. Ray</author><year>2003</year><price>39.95</price>

</book></bookstore>

The root element in the example is <bookstore>. All <book> elements in the document arecontained within <bookstore>. The <book> element has 4 children: <title>,< author>, <year>,<price>.

XML Syntax RulesAll XML Elements Must Have a Closing TagIn HTML, elements do not have to have a closing tag:<p>This is a paragraph<p>This is another paragraphIn XML, it is illegal to omit the closing tag. All elements must have a closing tag:<p>This is a paragraph</p><p>This is another paragraph</p>

XML Tags are Case SensitiveXML tags are case sensitive. The tag <Letter> is different from the tag <letter>.Opening and closing tags must be written with the same case:<Message>This is incorrect</message><message>This is correct</message>

XML Elements Must be Properly Nested

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 147/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

In HTML, you might see improperly nested elements:<b><i>This text is bold and italic</b></i>In XML, all elements must be properly nested within each other:<b><i>This text is bold and italic</i></b>

In the example above, "Properly nested" simply means that since the <i> element is openedinside the <b> element, it must be closed inside the <b> element.

XML Documents Must Have a Root ElementXML documents must contain one element that is the parent of all other elements. This

element is called the root element.

XML Attribute Values must be QuotedXML elements can have attributes in name/value pairs just like in HTML. In XML, the

attribute values must always be quoted. Study the two XML documents below. The first one isincorrect, the second is correct:<note date=12/11/2007><to>Tove</to><from>Jani</from>

</note>

<note date="12/11/2007"><to>Tove</to><from>Jani</from>

</note>The error in the first document is that the date attribute in the note element is not quoted.

Entity ReferencesSome characters have a special meaning in XML. If you place a character like "<" inside an

XML element, it will generate an error because the parser interprets it as the start of a newelement. This will generate an XML error:<message>if salary < 1000 then</message>To avoid this error, replace the "<" character with an entity reference :<message>if salary &lt; 1000 then</message>

There are 5 predefined entity references in XML:&lt; < less than

&gt; > greater than

&amp; & ampersand

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 148/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

&apos; ' apostrophe

&quot; " quotation mark

Comments in XMLThe syntax for writing comments in XML is similar to that of HTML.<!-- This is a comment -->

XML Stores New Line as LFIn Windows applications, a new line is normally stored as a pair of characters: carriage

return (CR) and line feed (LF). In Unix applications, a new line is normally stored as an LFcharacter. Macintosh applications also use an LF to store a new line. XML stores a new line asLF.

XML ElementsAn XML element is everything from (including) the element's start tag to (including) theelement's end tag.An element can contain:

• other elements• text• attributes• or a mix of all of the above...

<bookstore><book category="CHILDREN">

<title>Harry Potter</title><author>J K. Rowling</author><year>2005</year><price>29.99</price>

</book><book category="WEB"><title>Learning XML</title><author>Erik T. Ray</author><year>2003</year><price>39.95</price>

</book>

</bookstore>In the example above, <bookstore> and <book> have element contents, because they

contain other elements. <book> also has an attribute (category="CHILDREN"). <title>,<author>, <year>, and <price> have text content because they contain text.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 149/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

XML Naming RulesXML elements must follow these naming rules:

• Names can contain letters, numbers, and other characters• Names cannot start with a number or punctuation character• Names cannot start with the letters xml (or XML, or Xml, etc)• Names cannot contain spaces

Any name can be used, no words are reserved.

XML AttributesIn HTML, attributes provide additional information about elements:<img src="computer.gif"><a href="demo.asp">

Attributes often provide information that is not a part of the data. In the example below, thefile type is irrelevant to the data, but can be important to the software that wants to manipulatethe element:<file type="gif">computer.gif</file>

XML Attributes Must be QuotedAttribute values must always be quoted. Either single or double quotes can be used. For a

person's sex, the person element can be written like this:<person sex="female">or like this:<person sex='female'>

If the attribute value itself contains double quotes you can use single quotes, like in thisexample:<gangster name='George "Shotgun" Ziegler'>or you can use character entities:<gangster name="George &quot;Shotgun&quot; Ziegler">

Introduction to Web ServersA web server can be referred to as either the hardware (the computer) or the software (the

computer application) that helps to deliver content that can be accessed through the Internet. Aweb server is what makes it possible to be able to access content like web pages or other datafrom anywhere as long as it is connected to the internet. The hardware houses the content, whilethe software makes the content accessible through the internet.

The most common use of web servers is to host websites but there are other uses like datastorage or for running enterprise applications. There are also different ways to request content

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 150/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

from a web server. The most common request is the Hypertext Transfer Protocol (HTTP), butthere are also other requests like the Internet Message Access Protocol (IMAP) or the FileTransfer Protocol (FTP).

How Web Servers WorkThe Basic Process

Let's say that you are sitting at your computer, surfing the Web, and you get a call from afriend who says, "I just read a great article! Type in this URL and check it out. It's athttp://www.howstuffworks.com/web-server.htm." So you type that URL into your browser andpress return. And magically, no matter where in the world that URL lives, the page pops up onyour screen.

At the most basic level possible, the following diagram shows the steps that brought thatpage to your screen:

Your browser formed a connection to a Web server, requested a page and received it.Behind the Scenes

If you want to get into a bit more detail on the process of getting a Web page onto yourcomputer screen, here are the basic steps that occurred behind the scenes:

• The browser broke the URL into three parts:1. The protocol ("http")2. The server name ("www.howstuffworks.com")3. The file name ("web-server.htm")

• The browser communicated with a name server to translate the server name"www.howstuffworks.com" into an IP Address , which it uses to connect to the servermachine.

• The browser then formed a connection to the server at that IP address on port 80.Note: Any server machine makes its services available to the Internet using numbered ports ,one for each service that is available on the server. For example, if a server machine isrunning a Web server and an FTP server, the Web server would typically be available on port

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 151/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

80, and the FTP server would be available on port 21. Clients connect to a service at aspecific IP address and on a specific port.

• Following the HTTP protocol, the browser sent a GET request to the server, asking forthe file "http://www.howstuffworks.com/web-server.htm."

• The server then sent the HTML text for the Web page to the browser.• The browser reads the HTML tags and displays the page onto your screen.

Personal Web ServerPWS, an abbreviation for Personal Web Server, is Microsoft's version of a Web

server program for individual PC users who want to share Web pages and other files from theirhard drive. PWS is a scaled-down version of Microsoft's more robust Web server, InternetInformation Server IIS. PWS can be used with a full-time Internet connection to serve Webpages for a Web site with limited traffic. It can also be used for testing a Web site offline or froma "staging" site before putting it on a main Web site that is exposed to larger traffic.

PWS can be used together with Microsoft's FrontPage, a Web site design product, toupload Web pages from a remote location or to the local hard drive; to check for dead links; tocreate directories; and to set permissions. PWS is frequently used as part of the trendtoward peer-to-peer exchange and publishing.

How to Install Personal Web ServerStarting the Installation

There are two places you can get PWS, both of which are free. The Windows 98 CDincludes it, and you can download it from the Microsoft web site.Downloading from Microsoft.com

If you don't have the Windows 98 CD, you can download the NT4 Option Pack which,believe it or not, contains Personal Web Server for Windows 95 and 98.

Be aware that the download is 34mb, which will take nearly 3 hours to download with a28.8 modem.

To start the download, follow these steps:1. Go to the microsoft.com web site.2. Follow the instructions on the web site, choosing Windows 95 as the operating system even ifyou're running on Windows 98.3. After the download, the installation starts.

Installing from Windows 98 CD To install Microsoft Personal Web Server:

1. Insert your Windows 98 CD-ROM in your CD-ROM drive.2. Click Start, and then click Run.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 152/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

3. In the Open box, type the following path to the Setup.exe file, where x is the letter ofyour CD-ROM drive:

x:\add-ons\pws\setup.exe4. Click OK.5. Follow the instructions in Personal Web Server Setup.

Internet Information Server (IIS)Internet Information Server – is a web server application and set of feature extension

modules created by Microsoft for use with Microsoft Windows. It is the most used web serverafter Apache HTTP Server. IIS 7.5 supports HTTP, HTTPS, FTP, FTPS, SMTP and NNTP. It isan integral part of Windows Server family of products, as well as all editions of WindowsVista and Windows 7, although some features are not supported on client versions of Windows.IIS is not turned on by default when Windows is installed.Versions

• IIS 1.0, Windows NT 3.51 available as a free add-on• IIS 2.0, Windows NT 4.0• IIS 3.0, Windows NT 4.0 Service Pack 3• IIS 4.0, Windows NT 4.0 Option Pack• IIS 5.0, Windows 2000• IIS 5.1, Windows XP Professional and Windows XP Media Center Edition (requires

retail CD)• IIS 6.0, Windows Server 2003 and Windows XP Professional x64 Edition• IIS 7.0, Windows Server 2008 and Windows Vista (Home Premium, Business, Enterprise

and Ultimate editions)• IIS 7.5, Windows Server 2008 R2 and Windows 7

FeaturesThe architecture of IIS 7 is modular. Modules, also called extensions, can be added or

removed individually so that only modules required for specific functionality have to beinstalled. IIS 7 includes native modules as part of the full installation. These modules areindividual features that the server uses to process requests and include the following:

• HTTP modules – Used to perform tasks specific to HTTP in the request-processingpipeline, such as responding to information and inquiries sent in client headers, returningHTTP errors, and redirecting requests.

• Security modules – Used to perform tasks related to security in the request-processingpipeline, such as specifying authentication schemes, performing URL authorization, and

filtering requests.• Content modules – Used to perform tasks related to content in the request-processing

pipeline, such as processing requests for static files, returning a default page when aclient does not specify a resource in a request, and listing the contents of a directory.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 153/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

• Compression modules – Used to perform tasks related to compression in the request-processing pipeline, such as compressing responses, applying Gzip compression transfercoding to responses, and performing pre-compression of static content.

• Caching modules – Used to perform tasks related to caching in the request-processingpipeline, such as storing processed information in memory on the server and using cachedcontent in subsequent requests for the same resource.

• Logging and Diagnostics modules – Used to perform tasks related to logging anddiagnostics in the request-processing pipeline, such as passing information andprocessing status to HTTP.sys for logging, reporting events, and tracking requestscurrently executing in worker processes.

IIS 5.0 and higher support the following authentication mechanisms:• Basic access authentication• Digest access authentication•

Integrated Windows Authentication• .NET Passport Authentication (not supported in Windows Server 2008 and above)IIS 7.5 includes the following additional security features:

• Client Certificate Mapping• IP Security• Request Filtering• URL Authorization

Authentication changed slightly between IIS 6.0 and IIS 7, most notably in that theanonymous user which was named "IUSR_{machinename}" is a built-in account in Vista andfuture operating systems and named "IUSR". Notably, in IIS 7, each authentication mechanism isisolated into its own module and can be installed or uninstalled.

Apache Web ServerApache is generally recognized as the world's most popular Web server (HTTP server).

Originally designed for Unix servers, the Apache Web server has been ported to Windows andother network operating systems (NOS). The name "Apache" derives from the word "patchy"that the Apache developers used to describe early versions of their software.

The Apache Web server provides a full range of Web server features, including CGI, SSL,and virtual domains. Apache also supports plug-in modules for extensibility. Apache is reliable,free, and relatively easy to configure.

Apache is free software distributed by the Apache Software Foundation. The ApacheSoftware Foundation promotes various free and open source advanced Web technologies.

FeaturesApache supports a variety of features, many implemented as compiled modules which

extend the core functionality. These can range from server-side programming language supportto authentication schemes. Some common language interfaces support Perl, Python, Tcl,

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 154/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

and PHP. Popular authentication modules include mod_access, mod_auth, mod_digest, andmod_auth_digest, the successor to mod_digest. A sample of other featuresinclude SSL and TLS support (mod_ssl), a proxy module (mod_proxy), a URL rewriter (alsoknown as a rewrite engine, implemented under mod_rewrite), custom log files(mod_log_config), and filtering support (mod_include and mod_ext_filter).

Popular compression methods on Apache include the external extension module,mod_gzip, implemented to help with reduction of the size (weight) of web pages servedover HTTP. ModSecurity is an open source intrusion detection and prevention engine for webapplications. Apache logs can be analyzed through a web browser using free scripts suchas AWStats/W3Perl or Visitors.

Virtual hosting allows one Apache installation to serve many different actual websites. Forexample, one machine with one Apache installation could simultaneously servewww.example.com, www.test.com, test47.test-server.test.com, etc.

Apache features configurable error messages, DBMS-based authentication databases,and content negotiation. It is also supported by several graphical user interfaces (GUIs).Performance

Although the main design goal of Apache is not to be the "fastest" web server, Apache doeshave performance comparable to other "high-performance" web servers. Instead of implementinga single architecture, Apache provides a variety of MultiProcessing Modules (MPMs) whichallow Apache to run in a process-based, hybrid (process and thread) or event-hybrid mode, tobetter match the demands of each particular infrastructure. This implies that the choice of correctMPM and the correct configuration is important. Where compromises in performance need to bemade, the design of Apache is to reduce latency and increase throughput, relative to simplyhandling more requests, thus ensuring consistent and reliable processing of requests withinreasonable time-frames.

The Apache version considered by the Apache Foundation as providing high-performancesis the multi-threaded version which mixes the use of several processes and several threads perprocess.

While this architecture works faster than the previous multi-process based topology(because threads have a lower overhead than processes), it does not match the performances ofthe event-based architecture provided by other servers, especially when they process events withseveral worker threads.

This difference can be easily explained by the overhead that one thread per connectionbrings (as opposed to a couple of worker threads per CPU, each processing many connectionevents). Each thread needs to maintain its own stack, environment, and switching from onethread to another is also an expensive task for CPUs.Installing

Apache can be installed in a variety of ways depending on your operating system and howmuch control you want over the installation process. If you are installing the server on a

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 155/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Windows machine, you can download the latest binaries from the Apache website.If you are using a UNIX or Linux operating system (OS), you have more options. The

Apache website has the source code available to download and compile, as well as OS-specificbinaries. You can also install the Web server through the package manager of many Linux andUNIX systems.Configuring

Once installed, there are two main configuration files that should be edited. These files areplain text files that can be opened in any text editor. The files contain one directive per line andare case insensitive. Lines starting with the # character are considered comments and are ignoredby the server.

The main configuration file is the httpd.conf file. Linux/Unix users will usually find thisfile at /etc/httpd/httpd.conf. However, the Debian-based Linux distributions place the file at

/etc/apache2/apache2.conf. The default location in the Windows OS is C:\Program Files\ApacheGroup\Apache2\conf\httpd.conf.

The httpd.conf file holds the system information such as the server root directory, thelistening port, the maximum number of clients who can simultaneously connect and the numberof server instances the software can start at one time. Apache can also be configured for virtualhosting, which allows one server to serve many different clients at one time. The virtual hostdirectives are also held in the httpd.conf file.

The .htaccess file is a way to make changes to the main configuration on a directory level.This file must be created on a per-directory basis, and the configuration changes are applicableonly for the directory it resides in and any subdirectories. The .htaccess file allows you to requireauthentication before allowing site access, provide redirection, specify cgi handling and muchmore. The entire list of directives can be found in the Apache documentation.Starting

The Apache Web server runs as a service on all operating systems. A service is a softwareapplication that runs in the background with no user intervention. This allows outside users toaccess the Web pages any time the physical server is turned on, regardless of whether a user islogged in or not.

In Windows, you start the service under the "Services" option of the Control Panel. Therewill be a list of every service available to the users. You will choose the "Apache" service andclick "Start" next to it. To stop the service, you simply click "Stop."

Starting a service is different for Linux/Unix users. You must open a terminal window,which is found under "System Tools" or "Utilities" in the main "Applications" or "Start" menu.The service must be started by the root user. You can either switch to root using the "su"command or place the word "sudo" before the commands. The command to start the service is:

/etc/init.d/apache2 startThe command to stop the service is:

/etc/init.d/apache2 stop

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 156/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Once the service is started, you can test your configuration by typing "http://localhost" in aWeb browser address bar.

Section D: Privacy and Security Topics

Software ComplexityContributing Factors

• Program Size – A browser may consist of as many as 75000 lines of source code. Theexecutable file for a browser is usually on the order of 5 to 7 mega bytes. It is verydifficult to eliminate all errors in such an immense program.

Software Interfaces – The need for the browsers to interface with other software createsan even larger code base and more potential problem areas. • Market Forces – Products must be hurried to market in order to maintain a competitive

edge. It is often challenging to test all parts of them thoroughly before release. Onereason why new versions of large software systems come out so frequently is that bugsare addressed in newer releases.

• Team Development – Large teams of programmers are often used to developcomplicated programs such as browsers. Very few individuals can handle such a taskalone. Inconsistent styles, or even just carelessness on the part of a single programmercan result in bugs that are very difficult to find and correct.

EncryptionThere's a whole lot of information that we don't want other people to see, such as:

• Credit-card information• Social Security numbers

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 157/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

• Private correspondence• Personal details• Sensitive company information• Bank-account information

Encryption is the conversion of data into a form, called a ciphertext, that cannot be easilyunderstood by unauthorized people. Decryption is the process of converting encrypted data backinto its original form, so it can be understood.

The use of encryption/decryption is as old as the art of communication. In wartime,a cipher, often incorrectly called a code, can be employed to keep the enemy from obtaining thecontents of transmissions. (Technically, a code is a means of representing a signal without theintent of keeping it secret; examples are Morse code and ASCII.) Simple ciphers include thesubstitution of letters for numbers, the rotation of letters in the alphabet, and the "scrambling" ofvoice signals by inverting the sideband frequencies. More complex ciphers work according tosophisticated computer algorithms that rearrange the data bits in digital signals.

In order to easily recover the contents of an encrypted signal, the correct decryption key isrequired. The key is an algorithm that undoes the work of the encryption algorithm.Alternatively, a computer can be used in an attempt to break the cipher. The more complex theencryption algorithm, the more difficult it becomes to eavesdrop on the communications withoutaccess to the key.

Encryption/decryption is especially important in wireless communications. This is becausewireless circuits are easier to tap than their hard-wired counterparts. Nevertheless,encryption/decryption is a good idea when carrying out any kind of sensitive transaction, such asa credit-card purchase online, or the discussion of a company secret between differentdepartments in the organization. The stronger the cipher -- that is, the harder it is forunauthorized people to break it -- the better, in general. However, as the strength ofencryption/decryption increases, so does the cost.

In recent years, a controversy has arisen over so-called strong encryption. This refers tociphers that are essentially unbreakable without the decryption keys. While most companies andtheir customers view it as a means of keeping secrets and minimizing fraud, some governmentsview strong encryption as a potential vehicle by which terrorists might evade authorities. Thesegovernments, including that of the United States, want to set up a key-escrow arrangement. Thismeans everyone who uses a cipher would be required to provide the government with a copy ofthe key. Decryption keys would be stored in a supposedly secure place, used only by authorities,and used only if backed up by a court order. Opponents of this scheme argue that criminals couldhack into the key-escrow database and illegally obtain, steal, or alter the keys. Supporters claimthat while this is a possibility, implementing the key escrow scheme would be better than doingnothing to prevent criminals from freely using encryption/decryption.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 158/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Encryption SchemesComputer encryption is based on the science of cryptography , which has been used as

long as humans have wanted to keep information secret. Before the digital age, the biggest usersof cryptography were governments, particularly for military purposes.

The Greek historian Plutarch wrote, for example, about Spartan generals who sent andreceived sensitive messages using a scytale , a thin cylinder made out of wood. The generalwould wrap a piece of parchment around the scytale and write his message along its length.When someone removed the paper from the cylinder, the writing appeared to be a jumble ofnonsense. But if the other general receiving the parchment had a scytale of similar size, he couldwrap the paper around it and easily read the intended message.

The Greeks were also the first to use ciphers, specific codes that involve substitutions ortranspositions of letters and numbers. Here's an example of a typical cipher, with a grid of lettersand their corresponding numbers:

1 2 3 4 51 A B C D E

2 F G H I/J K

3 L M N O P

4 Q R S T U

5 V W X Y Z

If a Spartan general wished to send the message I AM SPARTA to another general, hewould write this series of numbers:

42 11 23 34 53 11 24 44 11As long as both generals had the correct cipher, they could decode any message the othersent. To make the message more difficult to decipher, they could arrange the letters inside thegrid in any combination.

Most forms of cryptography in use these days rely on computers, simply because a human-based code is too easy for a computer to crack. Ciphers are also better known todayas algorithms, which are the guides for encryption -- they provide a way in which to craft amessage and give a certain range of possible combinations. A key , on the other hand, helps aperson or computer figure out the one possibility on a given occasion.Computer encryption systems generally belong in one of two categories:

• Symmetric-key encryption•

Public-key encryption

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 159/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

Symmetric KeyJust like two Spartan generals sending messages to each other, computers using symmetric-

key encryption to send information between each other must have the same key.In symmetric-key encryption, each computer has a secret key (code) that it can use to

encrypt a packet of information before it is sent over the network to another computer.Symmetric-key requires that you know which computers will be talking to each other so you caninstall the key on each one. Symmetric-key encryption is essentially the same as a secret codethat each of the two computers must know in order to decode the information. The code providesthe key to decoding the message.

Caesar's CipherJulius Caesar also used a similar substitution technique, shifting three letters up. If he

wanted to say "CROSSING THE RUBICON," for instance, he'd write down "FURVV LQJWKHUXEL FRQ" instead. As you can see, the text is also broken up into even groups in order tomake the size of each word less obvious.

Think of it like this: You create a coded message to send to a friend in which each letter issubstituted with the letter that is two down from it in the alphabet. So "A" becomes "C," and "B"becomes "D". You have already told a trusted friend that the code is "Shift by 2". Your friendgets the message and decodes it. Anyone else who sees the message will see only nonsense.The same goes for computers, but, of course, the keys are usually much longer.

Public Key EncryptionOne of the weaknesses some point out about symmetric key encryption is that two users

attempting to communicate with each other need a secure way to do so; otherwise, an attackercan easily pluck the necessary data from the stream.

Also known as asymmetric-key encryption, public-key encryption uses two different keysat once -- a combination of a private key and a public key. The private key is known only to yourcomputer, while the public key is given by your computer to any computer that wants tocommunicate securely with it. To decode an encrypted message, a computer must use the publickey, provided by the originating computer, and its own private key. Although a message sentfrom one computer to another won't be secure since the public key used for encryption ispublished and available to anyone, anyone who picks it up can't read it without the private key.The key pair is based on prime numbers (numbers that only have divisors of itself and one, suchas 2, 3, 5, 7, 11 and so on) of long length. This makes the system extremely secure, because thereis essentially an infinite number of prime numbers available, meaning there are nearly infinitepossibilities for keys. One very popular public-key encryption program is Pretty Good Privacy(PGP) , which allows you to encrypt almost anything.

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 160/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

To implement public-key encryption on a large scale, such as a secure Web server mightneed, requires a different approach. This is where digital certificates come in. A digital certificateis basically a unique piece of code or a large number that says that the Web server is trusted byan independent source known as a certificate authority. The certificate authority acts as amiddleman that both computers trust. It confirms that each computer is in fact who it says it is,and then provides the public keys of each computer to the other.

Hashing AlgorithmThe key in public-key encryption is based on a hash value. This is a value that is computed

from a base input number using a hashing algorithm. Essentially, the hash value is a summary ofthe original value. The important thing about a hash value is that it is nearly impossible to derivethe original input number without knowing the data used to create the hash value. Here's a simpleexample:

Input number Hashing algorithm Hash value

10,667 Input # x 143 1,525,381

You can see how hard it would be to determine that the value 1,525,381 came from themultiplication of 10,667 and 143. But if you knew that the multiplier was 143, then it would bevery easy to calculate the value 10,667. Public-key encryption is actually much more complexthan this example, but that's the basic idea.

Public keys generally use complex algorithms and very large hash values for encrypting,including 40-bit or even 128-bit numbers. A 128-bit number has a possible 2 128, or3,402,823,669,209,384,634,633,746,074,300,000,000,000,000,000,000,000,000,000,000,000,000different combinations -- this would be like trying to find one particular grain of sand in theSahara Desert.

Secure Web DocumentsIf you notice a broken skeleton or an unlocked padlock displayed in the lower left corner of

the browser window, you are looking at icons that indicate that the document is not secure. Mostdocuments on the Web are not secure. When the skeleton key is whole or the padlock is locked,you are looking at a secure document. Secure documents require a secure server, which is aserver that uses encryption schemes. The URL of a secure document usually begins with https,rather than http, where the s means secure.

When a client requests a secure document, the server must first determine if they have thepermission required to retrieve the document. The authentication process may require the user tosubmit a password. The server and the client must agree on an encryption scheme, so that allmessages (including password) can be transmitted securely. Users may have to obtain a privatekey via some other mechanism (such as s-mail) before they can authenticate themselves to a

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 161/163

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 162/163

World Institute Of Technology8km milestone ,Sohna Palwal Road , NH !" # ,Sohna , $urgaon ,Haryana%

We&site ' www%wit%net%in ( mail ' info)wit%net%in

intranet pass through the firewall, which inspects each message and blocks those that do not meetthe specified security criteria.

The Nature of Today’s AttackersWho are these “hackers” who are trying to break into your computer? Most people imagine

someone at a keyboard late at night, guessing passwords to steal confidential data from acomputer system. This type of attack does happen, but it makes up a very small portion of thetotal network attacks that occur. Today, worms and viruses initiate the vast majority of attacks.Worms and viruses generally find their targets randomly. As a result, even organizations withlittle or no confidential information need firewalls to protect their networks from theseautomated attackers.

If a worm or a virus does find security vulnerability and compromises your system, it cando one of several things. To begin with, it will almost always start looking for other systems toattack so that it can spread itself further. In this case, you become one of the bad guys—becausethe worm or virus is using your computer to attack other systems on your internal network andthe Internet, wasting your computing resources and bandwidth. Even though the worm or viruswon’t know what to do with your confidential data, chances are good that it will open a newback door into your system to allow someone else to further abuse your computer andcompromise your privacy. Worms and viruses have dramatically increased the need for networksecurity of all kinds—especially the need for host-based firewalls.

Individuals still launch some attacks, though, and these are generally the most dangerous.The least worrisome attackers focus on crashing computers and networks by using Denial ofService (DoS) attacks. Others might be looking for confidential data that they can abuse forprofit, such as sales contacts, financial data, or customer account information. Still others mightbe amassing hundreds or thousands of computers from which to launch a distributed attackagainst a single network on the Internet.

The Firewall to the RescueIn the physical world, businesses rely on several layers of security. First, they rely on their

country’s government and military forces to keep order. Then, they trust their local police topatrol the streets and respond to any crimes that occur. They further supplement these publicsecurity mechanisms by using locks on doors and windows, employee badges, and securitysystems. If all these defenses fail and a business is a victim of a crime, the business’s insuranceagency absorbs part of the impact by compensating the business for a portion of the loss.

Just as you lock your car and home, you need to protect your computers and networks.Firewalls are these locks, and just like in the physical world, they come in different shapes andsizes to suit different needs. The famous Jargon Dictionary has a great definition for firewall: “adedicated gateway machine with special security precautions on it, used to service outsidenetwork connections and dial-in lines.”

8/13/2019 IF-Notes

http://slidepdf.com/reader/full/if-notes 163/163

Firewalls serve two useful purposes:• they filter what traffic comes into your network from the outside world, and• they control what computers on your network may send there.

It’s important to understand one thing, however. No firewall—whether a small, free host-based firewall or a multiple-thousand-dollar enterprise firewall array—will make your computersimpervious to attack. Firewalls, like locks and walls and moats and dragons, create barriers toattack—they get in the way of someone trying to take control. By making it difficult for attackersto get into your computer, by making them invest lots of time, you become less attractive.Firewalls very effectively block most bad guys from compromising an individual computer. Butit’s impossible to fully prevent every intrusion: All software has bugs, and someone might findan obscure bug in your firewall that allows them to pass through. In a nutshell, there’s no suchthing as absolute security..

Types of FirewallsThere are two main types of firewalls:

• Network firewalls and• Host-based firewalls.

Network firewalls , such as the software-based Microsoft’s Internet Security and Acceleration(ISA) Server or the hardware-based Nortel Networks Alteon Switched Firewall System, protectthe perimeter of a network by watching traffic that enters and leaves.Host-based firewalls , such as Internet Connection Firewall (ICF—included with Windows XPand Windows Server 2003), protect an individual computer regardless of the network it’sconnected to. You might need one or the other—but most businesses require a combination of