Fundamentals of Internet and Web Technologies Ver1
Fundamentals of Internet and Web Technologies Ver1
B.Com (CA)
FUNDAMENTALS OF INTERNET AND
WEB TECHNOLOGIES
(UG Course Material for MK University - Madurai)
NH7, Madurai Road, Panjampatti Bus Stop, Kalikampatti (PO),Dindigul - 624 303
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
Computer Network
A computer network is a set of computers connected together for the purpose of sharing resources.
The most common resource shared today is connection to the Internet. Other shared resources can
include a printer or a file server. The Internet itself can be considered a computer network.
Star Topology
A star topology is a design of a network where a central node extends a cable to each computer
on the network. On a star network, computers are connected independently to the center of the
network. If a cable is broken, the other computers can operate without problems. A star topology
requires a lot of cabling.
Bus Topology
A bus topology is another type of design where a single cable connects all computers and the
information intended for the last node on the network must run through each connected computer.
If a cable is broken, all computers connected down the line cannot reach the network. The benefit
of a bus topology is a minimal use of cabling.
Ring Topology
A similar topology is called a ring. In this design, computers are connected via a single cable, but
the end nodes also are connected to each other. In this design, the signal circulates through the
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 2
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
network until it finds the intended recipient. If a network node is not configured properly, or it is
down temporarily for another reason, the signal will make a number of attempts to find its
destination.
A collapsed ring is a topology where the central node is a network device called a hub, a router,
or a switch. This device runs a ring topology internally and features plugins for cables. Next, each
computer has an independent cable, which plugs into the device. Most modern offices have
a cabling closet, or a space containing a switch device that connects the network. All computers
in the office connect to the cabling closet and the switch. Even if a network plug is near a desk,
the plug is connected via a cable to the cabling closet.
Types of Networks
There are several different types of computer networks. Computer networks can be characterized
by their size as well as their purpose.
The size of a network can be expressed by the geographic area they occupy and the number of
computers that are part of the network. Networks can cover anything from a handful of devices
within a single room to millions of devices spread across the entire globe.
Some of the different networks based on size are:
In terms of purpose, many networks can be considered general purpose, which means they are
used for everything from sending files to a printer to accessing the Internet. Some types of
networks, however, serve a very particular purpose. Some of the different networks based on their
main purpose are:
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 3
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
Personal Area Network
A personal area network, or PAN, is a computer network organized around an individual person
within a single building. This could be inside a small office or residence. A typical PAN would
include one or more computers, telephones, peripheral devices, video game consoles and other
personal entertainment devices.
If multiple individuals use the same network within a residence, the network is sometimes referred
to as a home area network, or HAN. In a very typical setup, a residence will have a single wired
Internet connection connected to a modem. This modem then provides both wired and wireless
connections for multiple devices. The network is typically managed from a single computer but
can be accessed from any device.
This type of network provides great flexibility. For example, it allows you to:
• Send a document to the printer in the office upstairs while you are sitting on the couch with
your laptop.
• Upload a photo from your cell phone to your desktop computer.
• Watch movies from an online streaming service to your TV.
If this sounds familiar to you, you likely have a PAN in your house without having called it by its
name.
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 4
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
phone! If a local area network, or LAN, is entirely wireless, it is referred to as a wireless local area
network, or WLAN.
The Open Systems Interconnection (OSI) reference model describes how information from a
software application in one computer moves through a network medium to a software application
in another computer. The OSI reference model is a conceptual model composed of seven layers,
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 5
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
each specifying particular network functions. The model was developed by the International
Organization for Standardization (ISO) in 1984, and it is now considered the primary architectural
model for inter computer communications. The OSI model divides the tasks involved with moving
information between networked computers into seven smaller, more manageable task groups. A
task or group of tasks is then assigned to each of the seven OSI layers. Each layer is reasonably
self-contained, so that the tasks assigned to each layer can be implemented independently. This
enables the solutions offered by one layer to be updated without adversely affecting the other
layers. The following list details the seven layers of the Open System Interconnection (OSI)
reference model:
The upper layers of the OSI model deal with application issues and generally are implemented
only in software. The highest layer, application, is closest to the end user. Both users and
application-layer processes interact with software applications that contain a communications
component. The term upper layer is sometimes used to refer to any layer above another layer in
the OSI model.
The lower layers of the OSI model handle data transport issues. The physical layer and data-link
layer are implemented in hardware and software. The other lower layers
generally are implemented only in software. The lowest layer, the physical layer, is closest to the
physical network medium (the network cabling, for example, and is responsible for actually
placing information on the medium.
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 6
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
2. We see how hardware and software work together.
3. We can understand new technologies as they are developed.
4. Troubleshooting is easier by separate networks.
5. Can be used to compare basic functional relationships on different networks.
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 7
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
Transport layer breaks the message (data) into small units so that they are handled more efficiently
by the network layer.
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 8
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
3. This layer mainly holds application programs to act upon the received and to be sent data.
INTERNET
The Internet is a global collection of computer networks that are linked together by devices called
routers and use a common set of protocols for data transmission known as TCP/IP (transmission
control protocol / Internet protocol). The primary purpose of the Internet is to facilitate the sharing
of information. There are many different tools used on the Internet to make this possible. Some of
the more common tools include email, listservs, newsgroups, telnet, gopher, FTP, and the World
Wide Web. Probably the most popular of all Internet tools is the world wide web.
History of Internet:
• ARPANET is the first Internet network. ARPANET stands for Advanced Research
Projects Agency Networks.
• ARPANET was introduced by the United States. ARPANET has made the TCP/IP
correspondences standard, which characterizes information exchange on the web. In 1972,
E-mail was adapted by Ray Tomlinson of BBN to ARPANET. In this, Ray has included
@ symbol as address. TCP/IP was introduced in 1982.
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 9
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
• In 1978, the British post office telenet, DATAPAC, and TRANSPAC teamed up to make
the main worldwide packet-switched system service, and this was referred to as the IPSS.
• The abbreviation of IPSS is International Packet Switched Service. Network control
program was developed by a group called “the network working group”.
• NSF, abbreviated as the National Science Foundation, is mainly used to create the similar
and parallel network called NSF net.
Internet Protocol: A system must contain the IP address and it should be unique.
• The Internet protocol consists of two protocols: Transmission Control Protocol (TCP) and
the Internet Protocol (IP).
• The Internet Protocol determines basic applications, for example, electronic mail, terminal
imitating, and record exchange.
• Internet protocol architecture consists of four layers, they are:
• Data link layer: The data link layer is used for the encoding, decoding and logical
organization of data bits. Data packets are framed and addressed by this layer.
• Network layer: The main aim of this layer is to deliver packets from source to destination
across multiple links (networks). If two computers (system) are connected to the same link
then there is no need for a network layer. It routes the signal through different channels to
the other end and acts as a network controller.
• Transport layer: The main aim of the transport layer is to be delivered the entire message
from source to destination. It decides if data transmission should be on the parallel path or
single path.
• Application layer: It consists of protocols that focus on process-to-process communication
across an IP network and provides a firm communication interface and end-user services.
• World Wide Web: A web server is a computer that provides web services to the client. A
page hosted on the internet is known as web page. It can be viewed by a browser.
A browser can help locate a website on the internet. The World Wide Web (WWW) permits
user to view multi-media based documents like graphics, animations, audios and/or videos
and any subject. In 1990, the World Wide Web was introduced by Tim Berners-Lee of
CERN.
• E-Mail: Email is an electronic mail. It is used to send and receive the messages. It consists
of two components like message header and message body. The message header contains
added addresses and the body contains any information and sends any attached contents.
The Internet makes your work easy by communication technologies.
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 10
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
Uses of the internet:
1. Checking emails: It is reported that the first thing that 90 % of Internet users do when
they connected to the net is to check if they have received any emails.
2. Download: It is hard to find an Internet user, who has not used it to download music and
movies. Apart from it, there are lots of other things that can be downloaded using the
internet as well.
3. Search for relevant information: If you are not sure about something, then one of the
easiest ways to know more about it is by searching it on the internet.
4. Book Tickets: Online booking has made things really easy. it may be movie ticket or
flight ticket, you can book just about anything using the Internet. The process is very easy,
convenient and super-fast.
5. Shop Online: The use of internet is not limited merely to booking tickets. With help of
net, you can do a full-fledged online shopping. On popular e-stores like Ebay, Amazon
etc., one can find almost anything that he needs to buy.
6. Make Friends: One of the best things about internet is that is has made communication
very easy and convenient. We can make friends through social networks like Facebook,
twitter etc.
7. Socialize: Social networks have got really big since last decade. Facebook and Twitter
are the new online sites who like to share all the latest happening of their life on these social
networks and keep their profile duly updated.
8. E Banking: Banking was never so easy and convenient before! Right from opening an
account to operating it, E-Banking has really useful for everyone. We can also do online
transactions from the other accounts sitting at the home.
9. Data Sharing: Data sharing was never so easy and quick before! It doesn’t matter if you
have to send a file or song, a picture or an eBook,; with help of internet, you can send just
about anything at anywhere and that too, in no time.
Web Concepts
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 11
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
1. BROWSER -- A WWW browser is software on your computer that allows you to access
the World Wide Web. Examples include Netscape Navigator and Microsoft Internet
Explorer. Please know that a browser can’t work its magic unless you are somehow
connected to the Internet. At home, that is normally accomplished by using a modem that
is attached to your computer and your phone line and allows you to connect to, or dial-up,
an Internet Service Provider (ISP). At work, it may be accomplished by connecting your
workplace’s local area network to the Internet by using a router and a high speed data line.
2. HYPERTEXT AND HYPERMEDIA -- Hypertext is text that contains electronic
links to other text. In other words, if you click on hypertext it will take you to other
related material. In addition, most WWW documents contain more than just text.
They may include pictures, sounds, animations, and movies. Documents with links
that contain more than just text are called hypermedia.
3. HTML (HYPERTEXT MARKUP LANGUAGE) -- HTML is a set of commands
used to create world wide web documents. The commands allow the document
creator to define the parts of the document. For example, you may have text marked
as headings, paragraphs, bulleted text, footers, etc. There are also commands that
let you import images, sounds, animations, and movies as well as commands that
let you specify links to other documents. If you wanted to create your own web
page, you would need to know HTML or be able to use a tool that can generate
HTML such as Claris HomePage or Adobe PageMill.
4. URL (UNIFORM RESOURCE LOCATOR) -- Links between documents are
achieved by using an addressing scheme. That is, in order to link to another
document or item (sound, picture, movie), it must have an address. That address is
called its URL. The URL identifies the host computer name, directory path, and file
name of the item. It also identifies the protocol used to locate the item such as
hypertext, gopher, ftp, telnet or news. For example, the URL for the main page of
the OPEN (Oregon Public Education Network) website http://www.open.k12.or.us
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 12
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
others is called a server. A server requires special software in order to provide web
documents to others.
Internet Services
Internet Services allows us to access huge amount of information such as text, graphics, sound
and software over the internet. Following diagram shows the four different categories of Internet
Services.
Communication Services
There are various Communication Services available that offer exchange of information with
individuals or groups. The following table gives a brief introduction to these services:
Electronic Mail
1 Used to send electronic message over the internet.
Telnet
2
Used to log on to a remote computer that is attached to internet.
Newsgroup
3
Offers a forum for people to discuss topics of common interests.
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 13
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
Internet Relay Chat (IRC)
4
Allows the people from all over the world to communicate in real time.
Mailing Lists
5 Used to organize group of internet users to share common information through
e-mail.
Instant Messaging
7 Offers real time chat between individuals and group of people. Eg. Yahoo
messenger, MSN messenger.
Archie
2 It’s updated database of public FTP sites and their content. It helps to search a
file by its name.
Gopher
3
Used to search, retrieve, and display documents on remote sites.
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 14
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
VERONICA is gopher based resource. It allows access to the information
resource stored on gopher’s servers.
Web Services
Web services allow exchange of information between applications on the web. Using web
services, applications can easily interact with each other.
The web services are offered using concept of Utility Computing.
HTML is a formal Recommendation by the World Wide Web Consortium (W3C) and is generally
adhered to by the major browsers, Microsoft's Internet Explorer and Netscape's Navigator, which
also provide some additional non-standard codes. The current version of HTML is HTML 4.0.
However, both Internet Explorer and Netscape implement some features differently and provide
non-standard extensions. Web developers using the more advanced features of HTML 4 may have
to design pages for both browsers and send out the appropriate version to a user. Significant
features in HTML 4 are sometimes described in general as dynamic HTML. What is sometimes
referred to as HTML 5 is an extensible form of HTML called Extensible Hypertext Markup
Language (XHTML).
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 15
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
SGML (Standard Generalized Markup Language)
SGML (Standard Generalized Markup Language) is a standard for how to specify a
document markup language or tag set. Such a specification is itself a document type definition
(DTD). SGML is not in itself a document language, but a description of how to specify one. It is
metadata.
SGML is based on the idea that documents have structural and other semantic elements that can
be described without reference to how such elements should be displayed. The actual display of
such a document may vary, depending on the output medium and style preferences. Some
advantages of documents based on SGML are:
• They can be created by thinking in terms of document structure rather than appearance
characteristics (which may change over time).
• They will be more portable because an SGML compiler can interpret any document by
reference to its document type definition (DTD).
• Documents originally intended for the print medium can easily be re-adapted for other
media, such as the computer display screen.
The language that this Web browser uses, Hypertext Markup Language (HTML), is an example of
an SGML-based language. There is a document type definition for HTML (and reading the HTML
specification is effectively reading an expanded version of the document type definition). In
today's distributed networking environment, many documents are being described with the
Extensible Markup Language (XML) which is a data description language (and a document can
be viewed as a collection of data) that uses SGML principles.
SGML is based somewhat on earlier generalized markup languages developed at IBM, including
General Markup Language (GML) and ISIL.
An element has three parts: an opening tag, element's content and an closing.
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 16
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
1. <p> - the tag that opens a paragraph
2. Element's content - the paragraph itself.
3. </p> - the closing tag.
***Note:
All the web pages will have at least the base elements: html, head, title and body.
<html> element
An HTML document will always begin with a <html> tag and will end with </html>. This is the
standard structure of an HTML. Please open a Notepad and copy the next code:
HTML<html>
</html>
Save the document from the "File/Save As menu". Select All Files and name the new created file
"index.html".Hit "Save". Now open the file in a browser so that you have the possibility to
refresh the page (F5).
If you did everything well you will be able to see your web page white!
<head> element
The <head> element is the one that comes next. While you put it in
between html and bodyeverything should be just fine. "Head" has no visible function, so we will
talk about this aspect in the next tutorials. Even though I want to mention that <head> can offer
to the browser very useful information. You can introduce here other cods like JavaScript or
CSS.
For the moment we will let this tag empty, and we will introduce the next element from the list,
but first lets take a look without him:
HTML<html>
<head>
</head>
</html>
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 17
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
If you save the document and try to refresh the initial page from the browser you will not see any
difference. Just have a little patience, because next we will study some visible elements.
<title> element
So that every thing goes well you must put the title tag inside the head tag. what you write between
those two title tags ( <title> and </title>) will be seen as browser's name, usually in the upper right
side. Next we have the source code:
HTML<html>
<head>
<title> My first web page!</title>
</head>
</html>
Now save the file and open it in your browser. You will be able to see the title in the upper left or
right side as like the majority of the browsers.
You can put any name you want, just remember that the descriptive names are the ones that are
easier to find later.
<body> element
The body element is the one that defines the beginning of the page content itself (titles,
paragraphs, photos, music and any other content). As you can see in the menu from the left, we
will talk about all elements one by one.
For now all you need to keep in mind is that body covers all the content of the page.
HTML<html>
<head>
<title> My first web page!</title>
</head>
<body>
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 18
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
Hey guys! Here we will put the content later !
</body>
</html>
Now see what you have done, and after I invite you to see what is in the next section.
HTML - Forms
HTML Forms are required, when you want to collect some data from the site visitor. For example,
during user registration you would like to collect information such as name, email address, credit
card, etc.
A form will take input from the site visitor and then will post it to a back-end application such as
CGI, ASP Script or PHP script etc. The back-end application will perform required processing
on the passed data based on defined business logic inside the application.
There are various form elements available like text fields, textarea fields, drop-down menus, radio
buttons, checkboxes, etc.
The HTML <form> tag is used to create an HTML form and it has following syntax −
1 action
Backend script ready to process your passed data.
2 method
Method to be used to upload data. The most frequently used are GET and
POST methods.
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 19
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
3 target
Specify the target window or frame where the result of the script will be
displayed. It takes values like _blank, _self, _parent etc.
4 enctype
You can use the enctype attribute to specify how the browser encodes the
data before it sends it to the server. Possible values are −
application/x-www-form-urlencoded − This is the standard method most
forms use in simple scenarios.
mutlipart/form-data − This is used when you want to upload binary data
in the form of files like image, word file etc.
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 20
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
• Multi-line text input controls − This is used when the user is required to give details that
may be longer than a single sentence. Multi-line input controls are created using
HTML <textarea> tag.
Single-line text input controls
This control is used for items that require only one line of user input, such as search boxes or
names. They are created using HTML <input> tag.
Example
Here is a basic example of a single-line text input used to take first name and last name –
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<form >
<br>
</form>
</body>
</html>
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 21
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
This will produce the following result –
Attributes
Following is the list of attributes for <input> tag for creating text field.
1 type
Indicates the type of input control and for text input control it will be set
to text.
2 name
Used to give a name to the control which is sent to the server to be
recognized and get the value.
3 value
This can be used to provide an initial value inside the control.
4 size
Allows to specify the width of the text-input control in terms of characters.
5 maxlength
Allows to specify the maximum number of characters a user can enter into
the text box.
<!DOCTYPE html>
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 22
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
<html>
<head>
</head>
<body>
<form >
<br>
</form>
</body>
</html>
Attributes
Following is the list of attributes for <input> tag for creating password field.
1 type
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 23
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
Indicates the type of input control and for password input control it will be
set to password.
2 name
Used to give a name to the control which is sent to the server to be
recognized and get the value.
3 value
This can be used to provide an initial value inside the control.
4 size
Allows to specify the width of the text-input control in terms of characters.
5 maxlength
Allows to specify the maximum number of characters a user can enter into
the text box.
Example
Here is a basic example of a multi-line text input used to take item description −
<!DOCTYPE html>
<html>
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 24
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
<head>
</head>
<body>
<form>
</textarea>
</form>
</body>
</html>
Attributes
Following is the list of attributes for <textarea> tag.
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 25
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
1 name
Used to give a name to the control which is sent to the server to be
recognized and get the value.
2 rows
Indicates the number of rows of text area box.
3 cols
Indicates the number of columns of text area box
Checkbox Control
Checkboxes are used when more than one option is required to be selected. They are also created
using HTML <input> tag but type attribute is set to checkbox.
Example
Here is an example HTML code for a form with two checkboxes −
<!DOCTYPE html>
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 26
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
<html>
<head>
<title>Checkbox Control</title>
</head>
<body>
<form>
</form>
</body>
</html>
Attributes
Following is the list of attributes for <checkbox> tag.
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 27
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
1 type
Indicates the type of input control and for checkbox input control it will be
set to checkbox..
2 name
Used to give a name to the control which is sent to the server to be
recognized and get the value.
3 value
The value that will be used if the checkbox is selected.
4 checked
Set to checked if you want to select it by default.
Example
Here is example HTML code for a form with two radio buttons −
<!DOCTYPE html>
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 28
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
<html>
<head>
</head>
<body>
<form>
</form>
</body>
</html>
Attributes
Following is the list of attributes for radio button.
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 29
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
1 type
Indicates the type of input control and for checkbox input control it will be
set to radio.
2 name
Used to give a name to the control which is sent to the server to be
recognized and get the value.
3 value
The value that will be used if the radio box is selected.
4 checked
Set to checked if you want to select it by default.
Example
Here is example HTML code for a form with one drop down box
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 30
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<form>
</select>
</form>
</body>
</html>
Attributes
Following is the list of important attributes of <select> tag −
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 31
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
Sr.No Attribute & Description
1 name
Used to give a name to the control which is sent to the server to be
recognized and get the value.
2 size
This can be used to present a scrolling list box.
3 multiple
If set to "multiple" then allows a user to select multiple items from the menu.
1 value
The value that will be used if an option in the select box box is selected.
2 selected
Specifies that this option should be the initially selected value when the page
loads.
3 label
An alternative way of labeling options
Example
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 32
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
Here is example HTML code for a form with one file upload box −
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<form>
</form>
</body>
</html>
Attributes
Following is the list of important attributes of file upload box −
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 33
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
Sr.No Attribute & Description
1 name
Used to give a name to the control which is sent to the server to be
recognized and get the value.
2 accept
Specifies the types of files that the server accepts.
Button Controls
There are various ways in HTML to create clickable buttons. You can also create a clickable
button using <input>tag by setting its type attribute to button. The type attribute can take the
following values −
1 submit
This creates a button that automatically submits a form.
2 reset
This creates a button that automatically resets form controls to their initial
values.
3 button
This creates a button that is used to trigger a client-side script when the user
clicks that button.
4 image
This creates a clickable button but we can use an image as background of
the button.
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 34
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
Example
Here is example HTML code for a form with three types of buttons −
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<form>
</form>
</body>
</html>
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 35
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
page then the value of hidden control will be sent to the web server and there it will decide which
page will be displayed next based on the passed current page.
Example
Here is example HTML code to show the usage of hidden control −
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<form>
</form>
</body>
</html>
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 36
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
Java script
JavaScript is a lightweight, interpreted programming language. It is designed for creating network-
centric applications. It is complimentary to and integrated with Java. JavaScript is very easy to
implement because it is integrated with HTML. It is open and cross-platform.
Statements (JavaScript) Keywords and syntax that form the framework of a script.
Operators (JavaScript) Symbols and keywords that assign, compare, and combine values.
Top-level functions
(JavaScript) Functions not associated with any object.
Implied variable typing Ability to associate a variable with a data type to document your
(JavaScript) code and direct content assist.
Embedding Java in
JavaScript Ability to embed Java code.
Objects overview
Objects in JavaScript, just as in many other programming languages, can be compared to objects
in real life. The concept of objects in JavaScript can be understood with real life, tangible objects.
In JavaScript, an object is a standalone entity, with properties and type. Compare it with a cup, for
example. A cup is an object, with properties. A cup has a color, a design, weight, a material it is
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 37
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
made of, etc. The same way, JavaScript objects can have properties, which define their
characteristics.
Array Properties
Here is a list of the properties of the Array object along with their description.
1 constructor
2 index
The property represents the zero-based index of the match in the string
3 input
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 38
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
This property is only present in arrays created by regular expression
matches.
4 length
5 prototype
In the following sections, we will have a few examples to illustrate the usage of Array properties.
Array Methods
Here is a list of the methods of the Array object along with their description.
1 concat()
Returns a new array comprised of this array joined with other array(s) and/or
value(s).
2 every()
Returns true if every element in this array satisfies the provided testing
function.
3 filter()
Creates a new array with all of the elements of this array for which the
provided filtering function returns true.
4 forEach()
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 39
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
Calls a function for each element in the array.
5 indexOf()
Returns the first (least) index of an element within the array equal to the
specified value, or -1 if none is found.
6 join()
7 lastIndexOf()
Returns the last (greatest) index of an element within the array equal to the
specified value, or -1 if none is found.
8 map()
Creates a new array with the results of calling a provided function on every
element in this array.
9 pop()
Removes the last element from an array and returns that element.
10 push()
Adds one or more elements to the end of an array and returns the new length
of the array.
11 reduce()
Apply a function simultaneously against two values of the array (from left-
to-right) as to reduce it to a single value.
12 reduceRight()
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 40
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
Apply a function simultaneously against two values of the array (from right-
to-left) as to reduce it to a single value.
13 reverse()
Reverses the order of the elements of an array -- the first becomes the last,
and the last becomes the first.
14 shift()
Removes the first element from an array and returns that element.
15 slice()
16 some()
Returns true if at least one element in this array satisfies the provided testing
function.
17 toSource()
18 sort()
19 splice()
20 toString()
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 41
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
21 unshift()
Adds one or more elements to the front of an array and returns the new
length of the array.
In the following sections, we will have a few examples to demonstrate the usage of Array
methods.
Dynamic HTML
Dynamic HTML, or DHTML, is an umbrella term for a collection of technologies used together
to create interactive and animated websites[1] by using a combination of a static markup
language (such as HTML), a client-side scripting language (such as JavaScript), a presentation
definition language (such as CSS), and the Document Object Model (DOM).[2] The application of
DHTML was introduced by Microsoft with the release of Internet Explorer 4 in 1997.
DHTML allows scripting languages to change variables in a web page's definition language, which
in turn affects the look and function of otherwise "static" HTML page content, after the page has
been fully loaded and during the viewing process. Thus the dynamic characteristic of DHTML is
the way it functions while a page is viewed, not in its ability to generate a unique page with each
page load.
By contrast, a dynamic web page is a broader concept, covering any web page generated differently
for each user, load occurrence, or specific variable values. This includes pages created by client-
side scripting, and ones created by server-side scripting (such as PHP, Perl, JSP or ASP.NET)
where the web server generates content before sending it to the client.
DHTML is differentiated from Ajax by the fact that a DHTML page is still request/reload-based.
With DHTML, there may not be any interaction between the client and server after the page is
loaded; all processing happens in JavaScript on the client side. By contrast, an Ajax page uses
features of DHTML to initiate a request (or 'subrequest') to the server to perform additional actions.
For example, if there are multiple tabs on a page, pure DHTML approach would load the contents
of all tabs and then dynamically display only the one that is active, while AJAX could load each
tab only when it is really needed.
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 42
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
dynamic menus and text effects. The technologies used include a combination of HTML,
JavaScript or VB Script,
CSS and the document object model (DOM).
Designed to enhance a Web user’s experience, DHTML includes the following features:
• Dynamic content, which allows the user to dynamically change Web page content
• Dynamic positioning of Web page elements
• Dynamic style, which allows the user to change the Web page’s color, font, size or content
• It can be difficult to develop and debug because of lack of Web browser and technological
support.
• DHTML scripts may not work correctly in various Web browsers.
• The Web page layout may not display correctly when it is developed to display in different
screen size combinations and in different browsers.
As a result of these problems, Web developers must determine whether DHTML enhances the user
experience in any given context. Most Web developers abandon complex DHTML and use simple
cross-browser routines to improve user experience, as opposed to integrating excessive DHTML
visual effects.
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 43
Copyright © All Rights Reserved – Vijay Institute of Management
Vijay Institute of Management
MBA — TANCET Counselling Code 683
branch of the tree ends in a node, and each node contains objects. DOM methods allow
programmatic access to the tree; with them you can change the document's structure, style or
content. Nodes can have event handlers attached to them. Once an event is triggered, the event
handlers get executed.
B.Com (CA) –Fundamentals of Internet - Phone: 852 6396 369, 852 6396 469, 852 6396 569 44
Copyright © All Rights Reserved – Vijay Institute of Management