Web Design Notes For BCA 5th Sem 2019 PDF
Web Design Notes For BCA 5th Sem 2019 PDF
Digital Notes on Web Designing for BCA 5th Semester created by D.P.Mishra
Semester-5
BCA 501
Web Design
(According to Purvanchal University Syllabus)
On August 22/08/19
Unit – 1
Overview of Internet
Introduction to Internet and www–
Internet is a global communication system that links together thousands
of individual networks. It allows exchange of information between two
or more computers on a network. Thus internet helps in transfer of
messages through mail, chat, video & audio conference, etc.
It has become mandatory for day-to-day activities: bills payment, online
shopping and surfing, tutoring, working, communicating with peers, etc.
The World Wide Web (www, W3) is an information space where
documents and other web resources are identified by URIs, interlinked
by hypertext links, and can be accessed via the Internet. It has become
known simply as the Web. Hypertext documents are commonly
called web pages, which are primarily text documents formatted and
annotated with the Hypertext Mark-up Language (HTML).
Points to remember:
The length of datagram is variable.
The Datagram is divided into two parts: header and data.
The length of header is 20 to 60 bytes.
The header contains information for routing and delivery of the packet.
URL–
Uniform Resource Locator (URL) refers to a web address which uniquely
identifies a document over the internet.
This document can be a web page, image, audio, video or anything else
present on the web.
URL Types
There are two forms of URL as listed below:
Absolute URL
Relative URL
Absolute URL
Absolute URL is a complete address of a resource on the web. This completed
address comprises of protocol used, server name, path name and file name.
For example http://www.dpmishrakidiary.com/internet_technology
/index.htm. Where:
http is the protocol.
dpmishrakidiary.com is the server name.
index.htm is the file name.
The protocol part tells the web browser how to handle the file. Similarly we
have some other protocols also that can be used to create URL are:
FTP
https
Gopher
mailto
news
Relative URL
Relative URL is a partial address of a webpage. Unlike absolute URL, the
protocol and server part are omitted from relative URL.
Relative URLs are used for internal links i.e. to create links to file that are
part of same website as the WebPages on which you are placing the link.
Used to link web pages on different Used to link web pages within the same
websites website.
Changes when the server name or Remains same even of we change the server
directory name changes name or directory name.
Email–
Email is a service which allows us to send the message in electronic
mode over the internet. It offers an efficient, inexpensive and real time
mean of distributing information among people.
E-Mail Address
Each user of email is assigned a unique name for his email account. This name
is known as E-mail address. Different users can send and receive messages
according to the e-mail address.
E-mail is generally of the form username@domainname. For example,
dpmishrakidiary@gmail.com is an e-mail address where dpmishrakidiary is
username and gmail.com is domain name.
The username and the domain name are separated by @ (at) symbol.
E-mail addresses are not case sensitive.
Spaces are not allowed in e-mail address.
Domain Name–
When DNS was not into existence, one had to download a Host file containing
host names and their corresponding IP address. But with increase in number of
hosts of internet, the size of host file also increased. This resulted in increased
traffic on downloading this file. To solve this problem the DNS system was
introduced.
Domain Name System helps to resolve the host name to an address. It uses a
hierarchical naming scheme and distributed database of IP addresses and
associated names
IP Address
IP address is a unique logical address assigned to a machine over the network.
An IP address exhibits the following properties:
IP address is the unique address assigned to each host present on
Internet.
IP address is 32 bits (4 bytes) long.
IP address consists of two components: network component and host
component.
Each of the 4 bytes is represented by a number from 0 to 255, separated
with dots. For example 137.170.4.124
Domain Names
Domain Name is a symbolic string associated with an IP address. There are
several domain names available; some of them are generic such as com, edu,
gov, net etc, while some country level domain names such as au, in, za,
us etc.
The following table shows the Generic Top-Level Domain names:
Edu Education
au Australia
in India
cl Chile
fr France
us United States
za South Africa
uk United Kingdom
jp Japan
es Spain
de Germany
ca Canada
ee Estonia
hk Hong Kong
In the above diagram each subtree represents a domain. Each domain can be
partitioned into sub domains and these can be further partitioned and so on.
Name Server
Name server contains the DNS database. This database comprises of various
names and their corresponding IP addresses. Since it is not possible for a
single server to maintain entire DNS database, therefore, the information is
distributed among many DNS servers.
Hierarchy of server is same as hierarchy of names.
The entire name space is divided into the zones
Zones
Zone is collection of nodes (sub domains) under the main domain. The server
maintains a database called zone file for every zone.
If the domain is not further divided into sub domains then domain and zone
refers to the same thing.
The information about the nodes in the sub domain is stored in the servers at
the lower levels however; the original server keeps reference to these lower
levels of servers.
Web Browsers–
Web Browser is an application software that allows us to view and explore
information on the web. User can request for any web page by just entering a
URL into address bar.
Web browser can show text, audio, video, animation and more. It is the
responsibility of a web browser to interpret text and commands contained in
the web page.
Earlier the web browsers were text-based while now a day’s graphical-based
or voice-based web browsers are also available. Following are the most
common web browser available today:
Browser Vendor
Safari Apple
K-meleon K-meleon
Search Engines–
Search Engine refers to a huge database of internet resources such as web
pages, newsgroups, programs, images etc. It helps to locate information on
World Wide Web.
User can search for any information by passing query in form of keywords or
phrase. It then searches for relevant information in its database and return to
the user.
Web crawler
It is also known as spider or bots. It is a software component that traverses
the web to gather information.
Database
All the information on the web is stored in database. It consists of huge web
resources.
Search Interfaces
This component is an interface between user and the database. It helps the
user to search through the database.
Examples
Following are the several search engines available today:
Search Description
Engine
Google It was originally called BackRub. It is the most popular search engine
globally.
Ask It was launched in 1996 and was originally known as Ask Jeeves. It
includes support for match, dictionary, and conversation question.
LYCOS It is top 5 internet portal and 13th largest online property according to
Media Matrix.
Counters–
A web counter or hit counter is a computer software program that
indicates the number of visitors, or hits, a particular webpage has
received. Once set up, these counters will be incremented by one every
time the web page is accessed in a web browser.
Unit – 2
Principles of Web Design
Introduction to HTML–
HTML stands for Hyper Text Markup Language. It is a formatting language
used to define the appearance and contents of a web page. It allows us to
organize text, graphics, audio, and video on a web page.
Key Points:
The word Hypertext refers to the text which acts as a link.
The word markup refers to the symbols that are used to define
structure of the text. The markup symbols tells the browser how to
display the text and are often called tags.
The word Language refers to the syntax that is similar to any other
language.
HTML was created by Tim Berners-Lee at CERN.
Element examples
<head>
<title>The Title</title>
</head>
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>
<head>
</head>
</html>
Body Section
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>
<head>
</head>
<body>
</body>
</html>
<html>
<head>
<head>
<body>
<hr>
<body>
<html>
Inserting Text–
We can use <p>………</p> tag for inserting the text in our HTML Documents.
HTML uses elements like <b> and <i> for formatting output,
like bold or italic text.
Images–
Images can improve the design and the appearance of a web page.
The <img> tag is empty, it contains attributes only, and does not have a closing
tag.
The src attribute specifies the URL (web address) of the image:
<img src="url">
Example
<img src="img_girl.jpg" alt="Girl in a jacket" style="width:500px;height:600px;">
Hyperlinks–
HTML links are hyperlinks. You can click on a link and jump to another
document. When you move the mouse over a link, the mouse arrow will turn
into a little hand.
Note: A link does not have to be text. It can be an image or any other HTML
element.
Syntax
Example
<a href="https://www.dpmishrakidiary.com/study-material/">Visit our Study
Material Page</a>
Background Color
You can set the background color for HTML elements:
Example
<h1 style="background-color:DodgerBlue;">Hello World</h1>
<p style="background-color:Tomato;">Lorem ipsum...</p>
Text Color
You can set the color of text:
Example
<h1 style="color:Tomato;">Hello World</h1>
<p style="color:DodgerBlue;">Lorem ipsum...</p>
Border Color
You can set the color of borders:
Example
<h1 style="border:2px solid Tomato;">Hello World</h1>
<h1 style="border:2px solid DodgerBlue;">Hello World</h1>
An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.
The list items will be marked with bullets (small black circles) by default:
Example
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.
Example
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
Presentation is the style you give the content. In most cases presentation is
about the way a document looks, but it can also affect how a document sounds
– not everybody uses a graphical web browser.
HTML Tags
Tag is a command that tells the web browser how to display the text, audio,
graphics or video on a web page.
Key Points:
Tags are indicated with pair of angle brackets.
They start with a less than (<) character and end with a greater than (>)
character.
The tag name is specified between the angle brackets.
Most of the tags usually occur in pair: the start tag and the closing tag.
The start tag is simply the tag name is enclosed in angle bracket
whereas the closing tag is specified including a forward slash (/).
Some tags are the empty i.e. they don’t have the closing tag.
Tags are not case sensitive.
The starting and closing tag name must be the same. For example <b>
hello </i> is invalid as both are different.
If you don’t specify the angle brackets (<>) for a tag, the browser will
treat the tag name as a simple text.
The tag can also have attributes to provide additional information about
the tag to the browser.
Basic tags
The following table shows the Basic HTML tags that define the basic web
page:
Tag Description
<head> </head> Specifies the descriptive information about the web documents.
Formatting Tags
The following table shows the HTML tags used for formatting the text:
Tag Description
<b> </b> Specifies the text as bold. Eg. this is bold text
<i> </i> The content of italic tag is displayed in italic. Eg. Italic text
<ins> </ins> Specifies the inserted text. Eg. The price of pen is now 2015.
<del> </del> Specifies the deleted text. Eg. The price of pen is now 2015.
Table Tags
Following table describe the commonly used table tags:
Tag Description
List tags
Following table describe the commonly used list tags:
Tag Description
Frames
Frames help us to divide the browser’s window into multiple rectangular
regions. Each region contains separate html web page and each of them work
independently.
A set of frames in the entire browser is known as frameset. It tells the browser
how to divide browser window into frames and the web pages that each has to
load.
The following table describes the various tags used for creating frames:
Tag Description
<frameset> It is replacement of the <body> tag. It doesn’t contain the tags that
</frameset> are normally used in <body> element; instead it contains the
<frame> element used to add each frame.
<base> </base> It is used to set the default target frame in any page that contains
links whose contents are displayed in another frame.
Forms
Forms are used to input the values. These values are sent to the server for
processing. Forms uses input elements such as text fields, check boxes, radio
buttons, lists, submit buttons etc. to enter the data into it.
The following table describes the commonly used tags while creating a form:
Tag Description
Table Handling
Table Layout and presentation–
The HTML tables allow web authors to arrange data like text, images, links,
other tables, etc. into rows and columns of cells.
The HTML tables are created using the <table> tag in which the <tr> tag is
used to create table rows and <td> tag is used to create data cells. The
elements under <td> are regular and left aligned by default
Example
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>HTML Tables</title>
</head>
<body>
<table border = "1">
<tr>
<td>Row 1, Column 1</td>
<td>Row 1, Column 2</td>
</tr>
<tr>
<td>Row 2, Column 1</td>
<td>Row 2, Column 2</td>
</tr>
</table>
</body>
</html>
<TABLE BORDER=2>
<TR><TH><B>Production (tons)</B></TH><TH><B>% of goal</B></TH></TR>
<TR><TD><I>>North 40</I></TD><TD>87</TD><TD>102%</TD></TR>
<TR><TD><I>South 40</I></TD><TD>93</TD><TD>110%</TD></TR>
</TABLE>
This is how this simple table looks in HTML and when viewed in Internet
Explorer.
<head>
<title>Web page using Table</title>
</head>
<body>
<table width = "100%" border = "0">
<tr>
<td colspan = "2" bgcolor = "#b5dcb3">
<h1>This is Web Page Main title</h1>
</td>
</tr>
<tr valign = "top">
<td bgcolor = "#aaa" width = "50">
<b>Main Menu</b><br />
HTML<br />
PHP<br />
PERL...
</td>
</table>
</body>
</html>
Unit – 3
HTML Editors and Tools
HTML Editor Tools is a collection of free online resources that make web
content composing easier than ever. Work with HTML code directly in
your web browser without downloading and installing any suspicious
software. With a powerful cross browser and device compatibility
this HTML Editor will save you loads of time.
An HTML editor is a tool for editing or evaluating code in hypertext
markup language (HTML).
Use of Different HTML Editors and tools like Netscape Communicator and
Microsoft Front Page –
An HTML editor. Remember: With these HTML editors, you'll want to have
more than a basic understanding of HTML. These tools can help you fix
mistakes, but they can't write your code for you.
Netscape Communicator-
Netscape Communicator (or Netscape 4) is a discontinued Internet suite
produced by Netscape Communications Corporation, and was the fourth
major release in the Netscape line of browsers.
It was first in beta in 1996 and was released in June 1997. Netscape
Communicator addressed the problem of Netscape Navigator 3.x being
used as both the name of the suite and the browser contained within it
by renaming the suite to Netscape Communicator. It included more
groupware features intended to appeal to enterprises.
Netscape Composer is a WYSIWYG HTML editor initially developed by
Netscape Communications Corporation in 1997, and packaged as part of
the Netscape Communicator, Netscape 6 and Netscape 7 range of
Internet suites.
In addition, Composer can also view and edit HTML code, preview pages
in Netscape Navigator, check spelling, publish websites, and supports
most major types of formatting.
Basic Settings
To publish your Web site to our servers, you will need to use the following
information:
You will need to replace the above text with your own FrontPage account
information.
Unit – 4
Interactivity
An interactive web design is a design for websites which uses other inbuilt
software, modules or features aimed at creating an environment for a website
or web application user to be actively engaged during visit or use as the case
may be, thereby improving his or her user experience (UX).
Clients include Web browsers, chat applications, and email software, among
others. Servers include Web, database, application, chat and email, etc.
Static and Dynamic web pages–
Web pages can be either static or dynamic. "Static" means unchanged or
constant, while "dynamic" means changing or lively. Therefore, static
Web pages contain the same prebuilt content each time the page is
loaded, while the content of dynamic Web pages can be generated on-
the-fly.
It uses the HTML code for It uses the server side languages such as PHP,SERVLET, JSP, and
developing a website. ASP.NET etc. for developing a website.
It sends exactly the same It may generate different HTML for each of the request.
response for every request.
The content is only The page contains "server-side" code which allows the server to
changed when someone generate the unique content when the page is loaded.
publishes and updates the
file (sends it to the web
server).
Flexibility is the main Content Management System (CMS) is the main advantage of
advantage of static dynamic website.
website.
Creating Forms–
HTML Form is a document which stores information of a user on a web
server using interactive controls. An HTML form contains different kind
of information such as username, password, contact number, email id
etc.
The elements used in an HTML form are check box, input box, radio
buttons, submit buttons etc. Using these elements the information of an
user is submitted on a web server.
The form tag is used to create an HTML form.
<!DOCTYPE html>
<html>
<body>
<form>
Username:<br>
<br>
Email id:<br>
<br><br>
</form>
</body>
</html>
Output :
CGI–
The Common Gateway Interface (CGI) provides the middleware
between WWW servers and external databases and information
sources. The World Wide Web Consortium (W3C) defined the Common
Gateway Interface (CGI) and also defined how a program interacts with a
Hyper Text Transfer Protocol (HTTP) server.
The Web server typically passes the form information to a small
application program that processes the data and may send back a
confirmation message. This process or convention for passing data back
and forth between the server and the application is called the common
gateway interface (CGI).
Features of CGI:
It is a very well defined and supported standard.
CGI scripts are generally written in either Perl, C, or maybe just a
simple shell script.
CGI is a technology that interfaces with HTML.
CGI iss the best method to create a counter because it is currently the
quickest
CGI standard is generally the most compatible with today’s browsers
Advantages of CGI:
The advanced tasks are currently a lot easier to perform in CGI than in
Java.
It is always easier
ier to use the code already written than to write your
own.
CGI specifies that the programs can be written in any language, and on
any platform, as long as they conform to the specification.
CGI-based counters and CGI code to perform simple tasks are available
in plenty.
Disadvantages of CGI:
There are some disadvantages of CGI which are given below:
In Common Gateway Interface each page load incurs overhead by having
to load the programs into memory.
Generally, data cannot be easily cached in memory between page loads.
There is a huge existing code base, much of it in Perl.
CGI uses up a lot of processing time.
Function
Database applications are used to search, sort, filter and present information
based upon web requests from users. Databases can also contain code to
perform mathematical and statistical calculations on the data to support
queries submitted from web browsers.
Features
Databases grant and limit access to data based upon criteria such as user
name, password, region or account number. Databases also enforce data
integrity by ensuring that data is collected and presented using a consistent
format.
Effects
Unit – 5
Web Technologies
The methods by which computers communicate with each other through the
use of markup languages and multimedia packages is known as web
technology. In the past few decades, web technology has undergone a
dramatic transition, from a few marked up web pages to the ability to do very
specific work on a network without interruption.
JavaScript Statements:
JavaScript statements are the commands to tell the browser to what action to
perform. Statements are separated by semicolon (;).
1. switch case A block of statements in which execution of code depends upon different
cases. The interpreter checks each case against the value of the expression
until a match is found. If nothing matches, a default condition will be used.
4. do while Block of statements that are executed at least once and continues to be
executed while condition is true.
1. String
2. Numbers
Contains the numbers with or without decimal. E.g. var x=44, y=44.56;
3. Booleans
Contain only two values either true or false. E.g. var x=true, y= false.
4. Undefined
Variable with no value is called Undefined. E.g. var x;
5. Null
If we assign null to a variable, it becomes empty. E.g. var x=null;
1. Array
Can contain groups of values of same type. E.g. var x={1,2,3,55};
2. Objects
Objects are stored in property and value pair. E.g. var rectangle = { length: 5, breadth: 3};
<p id="demo"></p>
</script>
</body>
</html>
Output:
Macromedia Flash–
Macromedia Flash is a tool that allows powerful animations, interactive
features and other complex elements to be embedded in Web pages.
The HTML <applet> tag specifies an applet. It is used for embedding a Java
applet within an HTML document.
Example:
<!DOCTYPE html>
<html>
<head>
<title>HTML applet Tag</title>
</head>
<body>
<applet code = "newClass.class" width = "300" height = "200"></applet>
</body>
</html>