Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Class 10 Computer Notes

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 38

Chapter- 1 Introducing internet

1. URL
2. Blog
3. Blogger
4. Blogging
5. Newsgroup
6. Email
7. Email address
SERVER WEB SERVER
Any computer that is web server are computer that deliver webpage.
responsible for storing bulk they handle HTTP request.
data and process it as
requested by client
computers.
it manages network example.
resources such as sharing a http://www.edupillar.com
resources or storage
services provided: Services provided:
a) equipment/resourc a) serving web page
e sharing. b) running gateway program
b) Centralized file c) controlling Access to the server
saving for data d) monitoring and logging all Access.
sharing and e) server side scripting
returning output. Ser
c) Centralized virus ver
scanning .
d) Centralized backup

Server computer : ( capacity)


1. Memory { require large amount of RAM to work efficiently}
2. Storage {needs very large and fast hard disks.}
3. Processing power { more processing power with multiple strong
CPU }
4. Backup drives { inbuilt high-capacity tape backup drives }
5. Connectivity {two or more network cards to multiply the rate of
receiving and sending data. }
6. Robustness { components used in them need to be of higher
quality as servers run all day for a year}.
7. Scalability { expandable as network demand grows. i.e ability to
increase the size and power of equipment and networks as required.
Specifications may vary server to server. }

WEBSITE PORTAL
Collection of web page Content .collection of launch webpages or
pertaining to the Need and goal of array of web services like email,
the organization Owning the Search engine weather,gaming,
website. news etc
Website is generally linked to its It is an entry point or Gateway for
Own webpage. using Offered web services It
linked to many other Websites.

Carters to or delivers one specific A complete environment For


type of application Or information managing and Integrating a large
no. of diverse application.

Example: edupillar.com . Eg: google, yahoo, rediff etc.


Ncert.nic.in etc

Static webpage(constant) Dynamic webpage(changeable)


Information is pre-loaded and it is content change according the
constant unless the author alters user’s interaction with the
the same. website

User can interact with website By User can enter the keywords or
clicking the links. Click on the link to search
Information of particular website.
There is no scope for interaction There is a large scope for
Between the user and the interaction between user and
website. website as information are not
stable
Static content is written via HTML It also contains dynamic
code in a webpage. code(code written in a scripting
language lie PHP, java etc.)

what makes a webpage work?

1. Creation of webpage( proper coding is done for webpage)


2. Uploading / Publishing the webpage( webpage is loaded in on the server)
3. Retrieval ( the requested web page is delivered to client computer in web
Browser)
URLs/Web Address:
Location on a net server is called aURL.
It is the address of the web site.
Each website has its own address.
Eg. http://www.microsoft.com

Elements of URL :
i. The type of protocol or server
ii. The name/address of the server on the internet
iii. The location of the file on the server.

Server Protocol Information it provides


ftp File transfer protocol File organized in a hierarchical
structure i.e like a family tree
Gopher Transfer control protocol/ File organized in a menu
Internet protocol structure.
http Hypertext transfer protocol Hypertext/multimedia
Mail POP,SMTP Message sent via e-mail.
news Network news transfer Newsgroup is Organize in a
protocol hierarichal structure.

The character based naming system by which servers are identified is also
known as domain name system (DNS).

Some most common domain:

S no. Domain ID Affiliation


1. Com Commercial
2. Edu Education
3 Gov Government
4 Mil Military
5 Net Network resource
6 Org Usually non-profit organization
7 Co Company
8 Tv Television
Eg : http://www.microsoft.co.in

Country abbreviation:
Australia au

Canada ca

Denmark dk

France fr

India in

Japan jp

New zealand nz

United kingdom uk

United states us

News group: A news group or forum is online community bulletin board, where users can
post messages, respond to posted message or just read them. Groups of related message are
known as threads.
Eg. Alt.tennis, alt.astrology,comp.language.c++etc.

Ch-2 internet and web services


Introduction:
This chapter is dedicated to the practical application and use of Internet. In this chapter,
you will be learning about various web services along with the practical guidance for the
same.
Web Services:
Web services are the software based services that take place when two electronic
devices connected via network, communicate over www’s HTTP protocol.
Net Surfing:
Exploring the web is known as Net Surfing.

Downloading:

Making the copy of requested web page or file or document on your local computer is
called Downloading.

Search Engines:

A search engine is a program that searches through a database of web pages for
particular information.

How search engine works?

A search engine works with the help of following three elements:

i. Spiders or Workcrawler or Bots or Agents:


The search engine uses a software called spider or webcrawler or robot or bot or
agent which comb the Internet looking for documents and their web addresses . the
spiders of webcrawlers perform the methodical searches needed to find information.
The bots or spiders are given direction by the search engine and they crawl from one
server to another, compiling the huge lists of URL given by search engine.

ii. Indexing Software and Database:


The lists of documents and web addresses collected by bots are sent to the indexing
software. The indexing software extracts information from the documents and web
addresses, prepares on index of it and stores in a database.
iii. Search algorithm: when you perform a search by entering keywords, the search
engine software searches its database using a particular search method called search
algorithm. And then it displays the matching documents or web addresses.
Working with FTP :
FTP or file transfer protocol is a commonly used protocol for exchanging files over
any network that supports the TCP/IP protocol. TCP/IP is a main protocol used for
communications over Itnternet and intranets.
There are two computers involved in an FTP transfer:
i. FTP server
ii. FTP client
FTP server is a computer that is running FTP server software. The FTP server
listens on the network for connection requests from other computers.
FTP client is a computer running FTP client software which initiates a
connection to the server.
Some FTP client and server program are:
Windows OS: WinSCP, SmartFTP, FileZIla
Mac OS x: Cyberduck,RBrowser Lite, OneButton FTP
Chat: online text talk is called chat

Commonly used types of chat

i. Instant Messaging(IM)
ii. ICQ(“I seek you”)
iii. IRC-internet Relay Chat
iv. Web based chat

E-mail:

It stands for electronic mail. It is the most widely used tool to send messages electronically on a network.

e-mail address has two parts

a. Username:the portion on the left of @ is user name. it can not have blanks.
b. Domain name for the host server: the portion on the right of @ identifies the server host on the network. It is
also called as e-mail server.

Advantage of e-mail:

i. Low cost
ii. Speed
iii. Waste reduction
iv. Ease of use
v. Record maintenance
vi. Patience
Limitation :

i. Hardware requirement
ii. Impermanent
iii. A hasty medium
iv. Hard to convey emotions.

Difference between CC and BCC:

Both CC and BCC forward a copy of the message to every one you have listed. The main difference is CC allows you
to send mail message to multiple recipients at the same time and all other recipient can view the mail recipitent.

Where as BCC allows the sender to send mail message to multiple recipients without letting them know that some
other persons also have received the same message.hence protect the privacy of your recipient and help reduce
spam.

Spam and junk mail( search on internet)

Protocol used in e-mail:

Basically a protocol refers to standard set of rules used at each end of communication channel,
in order to properly transmit information.

The protocols mainly used with email accessing are IMAP,POP3,SMTP and HTTP.

i. IMAP (internet message access protocol): is a standard protocol for accessing e-mail
from local server. It is a client/server protocol in which e-mail is received and held for
the user by internet server.

This requires a small data transfer hence work well even over a slow connection such as
modem.

If user requests to read specific email message, then it will be downloaded from the server .

This protocol receives email.

ii. POP3 protocol: the Post Office Protocol provides a simple ,standardized
way for users to access mailboxes and download messages to their
computers.

The user can choose to leave copies of his/her emails on the server as well. The
advantage is that once message are downloaded the user can cut the connection
and read email at own leisure without incurring further communication costs.
On other hand he/she might have transferred a lot of messages( including spam or
viruses) , which may prove dangerous for data on PC. This protocol receives email.

iii. SMTP protocol: the simple mail transfer protocol is used when you send
email to another email user( the recipient). The SMTP protocol is used by
Mail transfer Agent to deliver the sent email to the recipients mail server.

This can only be used to send emails

iv. HTTP: it is not a protocol dedicated for email communication but it can be
used fr accessing mailbox. Also called as web based email, this protocol
can be used to compose or retrieve email from an account. Eg. Hotmail,
Gmail,Ymail etc.

Video Conferencing: A two way videophone conversation among multiple


participants is called video conferencing.

e-learning software: moodle,olat,siminars,H5P, skill share etc.

i. Areas of Application
ii. Advantage and disadvantage of video conferencing.(SEARCH ON
INTERNET)

e-learning: refers to the learning that takes place in an electronically simulated


environment.

I. Areas of application
II. Advantage and disadvantage of e-learning.(SEARCH ON INTERNET)

e-banking: availing banking services through electronic measures via internet.

The following terms all refers to one form or another of electronic banking :
personal computer banking, internet banking , virtual banking , online banking,
home banking , remote electronic banking and phone banking.(SEARCH ON
INTERNET)
e-shoppping: the process of shopping done over the internet. Both products and
services can be purchased through online shopping.eg.
www.flipkart.com,www.myntra.com, www.amazon.com etc.

i. Advantage and disadvantage of e-shopping.


ii. Threats and security concerns.(SEARCH ON INTERNET)

e-reservation: making reservations of tickets or hotel rooms or tourist packages


etc through internet is known as e-reservation.

i. Adventage and disadvantage


ii. Live and non- live reservation .(SEARCH ON INTERNET)

e-groups: refers to an online community where people discuss on topics of


common interests. A message posted in such a discussion is known as post.

All post are listed together on a discussion board, which is viewable to all the
members of the group.

i. Features
ii. Advantages and disadvantage. .(SEARCH ON INTERNET)

Social networking: is use of internet-based social media programs to make


connections with friends , family , classmates, customers and client, classmates.

i. Advantage and disadvantage.


ii. Features available
iii. Ethics in social networking.(SEARCH ON INTERNET

Ch-3 INTRODUCING DATABASES


introduction :
1. Database :
i. A database refers to a collection of related data .
ii. A database is basically a computer based record keeping system.
iii. A database contains information about one particular enterprise .
iv. It maintains any information that may be necessary to the decision
making processes involved in the management of that organization.
v. Main purpose of a database is to serve as many application as possible.
vi. It is often conceived of as the repository of information needed for
running certain functions in corporation or organization.
vii. Such data database permit the retrieval of data and continuous
modification of data needed for control of operations.

This chapter is going to discuss the basics of databases and their functioning.

Database functioning:

i. In a typical file-processing system, permanent records are stored in


various files.
ii. A number of different application programs are written to extract record
from and add record to appropriate fies.
iii. But this scheme has a number of major limitations and disadvantages,
such as:
a. Data inconsistency e. insecure data
b. Un sharable data f. incorrect data
c. Unstandardized data
iv. A database management system is answer to all these problem as it
provides a centralized control of the data.

How database Works.

i. Database systems do not maintain separate copies of the same data.


ii. Collection of data is kept at one place.
iii. That is if any change is to be made to data , it will be made at just one
place and the same changed information will be available to all the
application referring to it.
iv. But all redundancy is not eliminated , as sometime there are sound
business or technical reasons for maintaining multiple copies of the
same data.
v. It controls the redundancy to the desired extent.

database

End users

Application
programs

Fig : Centrally controlled database system.

Advantages of Databases:
1. Databases reduce the data redundancy to a large extent.
Duplication of data is called Data Redundancy.
It stores all data at one place hence all application programs that
require this data can refer to the same central place.
This centralization makes sure that data remain consistent and
secure.
2. Databases can control data inconsistency to a large extent.
i. Inconsistent database provide incorrect or conflicting
information.
ii. Controlling redundancy , controls the inconsistency.
iii. If there are any redundancy retained in the database due to
some technical reasons .the database management system
ensures that any change made to either of the two entries is
automatically made to the other . this process is known as
propagating updates.
iv. Multiple mismatching copies of same data is known as Data
inconsistency.
3. Database facilitate sharing of data.
i. Individual pieces of data in the database can be shared among
several different user ,depending on their purpose .

BASE- DBMS of OpenOffice.org


The database file of BASE is stored with extension .odb
it offers following features:

1. Tables- refers to storage container storing data pertaining to


single object, subject or purpose
2. Queries- is a statement that gives you filtered data according to
your conditions and specification.
3. Forms- is an interface in user specified layout that lets users
view, enter change data directly in table.
4. Reports- is an effective way to present data in a printed format.

Designing a databases:

Good database design is the keystone to creating a datasbase that does what
we want it to do effectively , accurately and effectively.

Steps in database designing:


Step 1: determine the purpose of your database and how it is to be used.

What information you want from the database,

What subjects you need to store facts about(the tables)

What facts you need to store about each subject(the field of table)

Step2: determine the tables you need(structure).

Table should not contain duplicate information and information should not
be duplicated between tables

Each table should contain information about one subject.

Step3 : determine the fields you need

Each table should contain information about the same subject and each field
contain individual facts about the table subject.

Tips for designing table field:

i. Relate each field directly to the subject of the table.


ii. Don’t include derived or calculated data.
iii. Include all information you need.
iv. Store information in its smallest logical parts(eg: first name, last name,
rather than name)

Step4: identify the field with unique values in each record.

Set primary key to connect information stored in separate table.

Step5:determine the relationships between tables. The relationships can be


set on the basis of common fields in tables.

Step6: refine your design. Its time to study the design and detect any flaws
that might remain.

Step7: enter data and create other database object ,once you are satisfied
with table structure and meet design principles.
You can create any queries, forms, reports and data access pages.

Chapter-4 OpenOffice.org BASE


BASE Window Components:
1. Title bar
2. Menu bar
3. Tool bar
4. Database window
5. Object button
6. Status bar

Creating database:
Deciding Table content and Properties:
Decide the number of fields required, fields name, field type, field size ,
other properties and PRIMARY KEY.
1. Field name: is the label that tells what type of information is being stored in
this field.

2. Field type or data type:

Field stores one type of information which is composed of characters.

The number of character that a field can store is called field length or field
width. There can be fixed length fields as well as Variable length fields.

i. Fixed length fields:


They occupy fixed number of bytes for every data element they store.
In fixed length fields, some space is always wasted as all data element
do not use all the space.
Processing is much simpler in case of fixed length fields.

ii. Variable Length Fields:


Variable length fields have varied field length.
The number of characters in data elements become its field length.
There is no wastage of space .
Processing is complex.

In OOoBASE, the datatypes belong to one of the following categories:


1. Text data types – to store string and text type values
2. Date/Time data types-to store date and time
3. Numeral data types- to store all type of number
4. Special data types – to store other type of data e.g images etc.
1. Text datatypes
There are four types:
a. Text (fix) [CHAR] – default length is 50. It is fixed length datatype
b. Text [VARCHAR]- default length is 50. It is variable-length datatype
c. Text [VARCHAR-IGNORECASE]- exactly similar to text[varchar]. Ignores
the case of letter.
d. Memo [LONGVARCHAR]- stores upto 2GB , stores large information
about fields.
2. DATE/TIME datatypes

There are three types:

a. Date [DATE]
b. Time [TIME]
c. Date/Time [TIMESTAMP]- combination of both time and date
3. Numeral Data Types:
Classified into two:
a. Whole-Number data types b. Fractional value data types
i. Tiny Integer[TINYINT] i. Float [FLOAT]
ii. Small Integer[SMALLINT] ii. Real [REAL]
iii. Integer [INT] iii. Double[DOUBLE]
iv. Big Integer [BIGINT] iv. Numeric[NUMERIC]

v.Decimal[DECIMAL]

Note:-

In all the fractional value data type we can set the field to accept a number upto
several decimal places by using Decimal Place property.

4. Special Data type


These are:
1. Yes/No[BOOLEAN]- to handle yes or no input.
2. Image[LONGVARBINARY]- to input image in field.
3. Binary[VARBINARY]- to handle any type of binary code .
4. Binary[FIX]- similar to binary field, only that its field length or space is
fixed.
5. Other[OTHER]- we can enter anything including code for images,
sound,files etc.

Length(Field Size or Field Width)

i. Text field – 1 byte to 2 GB, default length is 50.


ii. Numeral Field –
a. Tiny Integer- fix length 3,stores no. from -128 to +127, size 1 byte
b. Small Integer-fix length 5, stores no. from -32768 to +32767, size 2
byte
c. Integer- fix length 10, stores no. from -2147483648 to +2147483647,
size 4 byte.
d. Big Integer- fix length 19, stores no. from -2^63 to +2^63-1, size 8
bytes
e. Float, real,Double – all have storage size 4 byte each.
f. Numeric , Decimal – there is virtually no limit on their size.
iii. Special field:
a. Image- Max. 2GB
b. Binary –Max. 2GB
c. Binary- Max. 2GB

Field Properties:

the field properties control the behavior of a field.

a. Entry required
b. Length
c. Decimal Places
d. Default values
e. Format example

Ch-7 HTML -II

Introduction:
Tools that helps to organise information into documents

that readers quickly understand, scan and extract.

This chapter include HTML images ,Links and tables.

Inserting Images

Browser can display image file if they are GIF(graphic interchange format) or XBM( X
BitMap) or JPEG format.

Tag:<img src>

Attributes: src=” image file name”{URL of GIF or JPEG image that is to be inserted in the
document

I.e to specify image source}


alt=”text”{ to specify alternate text. Text string upto 1024 character}

align=”left/right/top/middle/bottom” {for image alignment}

height=” value”

width=” value”

title=” tooltip text” {title attribute is useful for referencing unlabled resource. Internet Explorer
can display alt text as tooltip text.}

Note:

Inline image means image display in line with the text.i.e the image is loaded separately and
placed into the text flow as if the image were some special character.

Centering an image:

to horizontally center an image.

<CENTER> <img src=”image.jpg”></CENTER>

Subscript :

Tag: <SUB>.........</SUB>

eg.H<sub>2</sub>O,NH<sub>4</sub>,CaCO<sub>3</sub>

Superscript:

Tag: <SUP>.........</SUP>

eg.(a+b)<sup>2</sup>=a<sup>2</sup>+2ab+b<sup>2</sup>

x<sup>2</sup>+y<sup>2</sup>=c

Linking:

its an ability to link text or an image to another document or section of a document.

Browser highlights the indentified text or image with color/underlines to

indicate that it is a hyper text link.

Tag:

<A> …..........</A> anchor tag


attribute: href=”filename”

link are of two type:

I. External link

II. Internal link

I. External link:

links two document.

<A href=”filename.html” > hyperlink text</A>

II. Internal link:

links various sections of same or different document.

This is a two step process.

Step1: first make the target fragement using (name) attribute .

Step2: create link to the fragement. Using (href) attributes.

Link within the same document:

I. <A name=”segment”>segment1</A>

II. <A href=”#segment1”> link to segment</A>

link between Section of Different Document:

I. <A href=”filename.html#sample”>hyperlink text</A>

II. <A name=”sample”>hyperlink text</A>

significance of Linking:

linking is very useful feature supported by HTML.

Since two or more separated documents can be created and then linked with one another, it
makes the user able to go any of the desired documents with just a click. Further webpage
designer don't have to create a large document having all the information of these documents.

Sending e-mail from a Browser:


 Any users can directly communicate with you via email.

 This can be done using MAILTO.

 MAILTO is called using an Anchor with attribute “href”.

 When a MAILTO capable browser sees the tag, it spwans a separate email form that the
user may fill out.this is than sent automatically to the email address specified in the link.

 To send email to multiple people put all of the email address in the same link and
separate by commas.

 To add subject add ?SUBJECT=”subject line for message” at the end of email address.

 Eg: <body>

send your comments to<A href=”mailto: pacesa@gmail.com?


subject=”information”>

pacesa@gmail.com</A>

</body>

Tables:

The HTML table model allows you to arrange data-text,preformatted text,image, links, forms,
from fields, other tables etc. - into rows and columns of cells.

Tables are useful for the general display of tabular data.

Table rows may be grouped into head(header), foot(footer), and body sections,(via the THEAD,
TFOOT and TBODY elements).

Various Table tags:

I. <table> tag : which rap up a table and its elements in HTML.

II. <tr> tag: which defines a table row.

III. <th>tag: defines table header

IV. <td>tag: defines table data cells

V. <caption> tag: defines title or caption for the table.

VI. <theader> tag: defines table header.


VII. <tbody>tag: defines table section.

VIII. <tfooter>tag: defines table footer.

Table Attributes:

I. border=”value” {tells the table how large the border should be}

II. bordercolor=”color name” { specify the color of the table border}

III. Frame=”above/below/border/box/hside/lhs/rhs/ void/vside”

{defines the position of the border.}

note:

 frame attribute of <table> is always used with Border attribute. The frame attribute
defines position of the border.

 Above: displays the top edge only.

 Below:displays bottom edge only.

 Border: displays all four sides(default).

 Box: displays all four sides(like border).

 Hsides: displays top and bottom edges.

 Lhs: displays left edge only.

 Rhs: displays right edge only.

 Void: displays no border.

 Vsides: display left and right edges.

IV. rules=”all/cols/groups/none/rows”

note:

 the RULES attributes like FRAME , also works with the BORDER attributes, except
RULES dealswith the inside border edges.

 All: displays all borders


 cols: displays borders between cells.

 Groups: displays borders between all cell groups

 none: hides all interior borders

 rows: displays borders between rows only.

V. CELLSPACING=”value in terms of number”

VI. CELLPADDING=”value in terms of number”

note:

CELLSPACING gives the amount of space between cells.

CELLPADDING gives the amount of space (or padding) between the cell border and the
cell contents.

VII. Align=”left/right/center” { aligns the complete table w.r.t the text in the browser}

VIII. BACKGROUND=” image.jpg” {the specified image is tiled to fill the background of the
table.}

IX. BGCOLOR=”color name” { specify the desired background color for the table”}

X. HEIGHT=”value”

XI. WIDTH=”value”{ specify table in terms of pixels or percentage of browser window}

The <TD>tag:

the TD tag is the workhorse of the table. It denotes Table Data.

Attributes:

I. Align=”left/right/center”{ horizontal alignment of the contents of a cell. Default


alignments is left}

II. WIDTH=”value” {defines the width of a cell either in pixels or in percentage value of
table width.}

III. BACKGROUND=”image.jpg”

IV. BGCOLOR

V. ROWSPAN=”value”{merge two or more cells into single cell in a row}


VI. COLSPAN=”value”{merge two or more cells into single cell in a column}

VII. VALIGN=”top/middle/bottom” {data can be vertically align }

The <TH> tag:

Table header content is declared as header are displayed in a distinctive style e.g. boldfaced.

Attributes: It accepts the same attributes as the <TD> tag.

The <TR> tag:

table row is use to insert row in a table.

<tr>tag indicates begning of the table row.

</tr>tag indicates end of the table row.

Attributes: it accepts the same attributes as the <TD>tag, except rowspan and colspan.

The <THEAD> tag:

it is used to define a set of header rows.this tag is only allowed once in a table. The browser will
replicate these heading rows when the table is displayed or printed in multiple sections or pages.
It should be used in the begning.
Attributes:
i. Align=”left/center/right”

ii. Bgcolor=”color name”

iii. Valign=”top/middle/bottom”

The <TFOOT> tag:it is use to define a set of footer row in a table. This tag is only allowed
once in a table.TFOOT must follow the THEAD and must precede the TBODY. Hence should
be used in the end.

The set of rows defined as table-footer by TFOOT will also be replicated on multiple pages and
will appear at the bottom.
Attributes:
i. Align

ii. Bgcolor

iii. Valign

The <TBODY>tag:
The tags <THEAD>,<TBODY>,<TFOOT> are used to divide an HTML table in sections ,
Where THEAD and TFOOT are used to define header and footer sections, the table body
section is defined using <TBODY>

Attributes:

i. Align

ii. Bgcolor

iii. Background=”image”

iv. Valign

Example code:

Code1: <html>
<head><title> table</title></head>
<body>
<table border="2" bordercolor="blue" frame="rhs" align="center" rule="groups"
background="yellow" cellspacing="4" cellpadding="5">

<TR>
<TD>roll no.</TD>
<TD>name</TD>
<TD>contact no.</TD>
</TR>

<TR>
<TD>1.</TD>
<TD>Harry</TD>
<TD>9876623451</TD>
</TR>

<TR>
<TD>2.</TD>
<TD>Sara</TD>
<TD>9867235436</TD>
</TR>

<TR>
<TD>3.</TD>
<TD>Denny</TD>
<TD>9834775768</TD>
</TR>
</table>
</body>
</Html>
Code :2
<html>

<head><title> table</title></head>
<body>
<table border="2" color="blue" frame="box" align="center" rule="groups"
background="sunset.jpg" cellspacing="4" cellpadding="5">
<A href="table3.html">click</A>
<caption>Student Information</caption>
<thead align="left" Valign="bottom" bgcolor="yellow">
<TR>
<TD>roll no.</TD>
<TD>name</TD>
<TD>contact no.</TD>
</TR>
</thead>
<tfoot align="left" Valign="middle" bgcolor="lime">
<TR>
<TD>student</TD>
<TD>data</TD>
<TD> DPS </TD>
</TR>
</tfoot>
<tbody background="sunset.jpg">
<TR>
<TD>1.</TD>
<TD>Harry</TD>
<TD>9876623451</TD>
</TR>
<TR>
<TD>2.</TD>
<TD>Sara</TD>
<TD>9867235436</TD>
</TR>
<TR>
<TD>3.</TD>
<TD>Denny</TD>
<TD>9834775768</TD>
</TR>
</tbody>
</table>
</body>
</Html>
Code:3
<html>
<head>
An HTML table with a table cell that spans two rows:
</head>
<table border="3" rules="all">
<tr>
<th>Month</th>
<th>Savings</th>
<th>Savings for holiday!</th>
</tr>

<tr>
<td>January</td>
<td>$100</td>
<td rowspan="2">$180</td>
</tr>

<tr>
<td>February</td>
<td>$80</td>
</tr>
</table>
example for colspan:
<table border="4" rules="all">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>

<tr>
<td>February</td>
<td>$100</td>
</tr>

<tr>
<td colspan="2">Sum: $200</td>
</tr>
</table>
</body>
</html>
Code:4
AIM: Design a web page to set up a internal and external link and save the
document as file1.html.
Create an external link with File2.html
Source Code:
<HTML>
<HEAD><TITLE> Linking </TITLE></HEAD>
<HR>
<BODY>
Index:
<A href="#introduction"> 1. Introduction</A> <BR>
<A href="#classification"> 2. classification of Virus</A><BR>
<A href="#preventive"> 3. Preventive measures</A> <BR>
<A href="#identification"> 4. Identifing the virus</A><BR>
<A href="#anti"> 5. anti-virus software</A>
<HR>
<A name="introduction"> <H3>Introduction:</H3> </A>

Virus are melicious program that infect the computer system. <BR>
Worms, Trojan, spyware etc. are the types of viruses<BR>
<BR>

<A name="classification"><H3>classification of viruses</H3></A>

viruses can be classified as Resident and Non-resident Viruses.<BR>


A resident virus stays in the computer memory.
It spreads without the user executing it once it is the memory.<BR>
Non-resident viruses spread only.<BR>
when the user executes an infected program.
<BR>
<BR>
<BR>
<A name="preventive"><h3>preventive measures</h3></A>
To prevent a virus attack, you can follow certain principles. some of them
are: <BR>
1. never use CD's/pen drives from the unknown sources.
If you have to use them, scan them before use.<BR>
2. never allow unknown users to use your computer.<BR>
3. turn off automatic opening of e-mail attachments.
Never open attachments from unknown sources.<BR>
<BR>
<BR>
<A name="identification"><h3> Identification of viruses</h3></A>
Here Are some signs:<BR>
1. your system performance is reduced . it becomes dead slow.<BR>
2. you get unwanted message in your system again and again. <BR>
3. your system might shut down unexpectedly or freezes and your
application may start or close automatically.<BR>
4. your network connection will be lost or becomes slow.<BR>
<BR>
<BR>
<A name="anti"><h3>Anti-virus software</h3></A>
An Anti-virus software helps us detect and remove a virus.
Such software usually has a dictionary of virus description.<BR>
whenever your computer is scanned of a virus,
the anti-virus software compares the files that are scanned with the virus
dictionary.<BR>
if there is a match , the anti-virus software blocks the execution of the virus
and
alerts you that a virus has been found.<BR>
<H4><b>Some popular anti-virus software</b></H4>
1. Kaspersky 2. Norton 3. McAfee 4. PC-Cillin 5. Panda

<H3><b> External link</b></H3>


<A href="image.HTML">click to navigate</A>

<H3><B>links between section of different documents: </B></H3>


</BODY>
</HTML>

Ch- 8 XML
INTRODUCTION:

The explosion of web created many opportunities and newer way of interaction-be it interaction among friends
or among teacher and student or among businesses and clients and so on.

Data was exchanged in one or the other way, especially business interaction were data being exchanged needed
proper descriptions.

In earlier days of web data sharing was done in a number of ways. One such data sharing technology was EDI-
electronic data exchange.

Although EDI provided accurate and secure data sharing but it required a specific type of network such as
point-to-point communication method or a VAN which made it costly and it had fixed business rule.

To remove/reduce the problems with EDI a new technology namely XML(eXtensible Markup language) was
developed. It could also address the problems faced by EDI.

What is Xml?

Xml is eXtensible markup language which allows to create application specific structured document by
allowing creation of new tags. These structured document can later be rendered(i.e presented in human-
understandable manner) in a different ways.

The eXtensible means you can extend XML’s specifications to define new markup language.XML is a cross-
platform , hardware and software independent markup language.

What is markup language?

A markup language is a set of rules/tags that define the structure and format of text while presenting text. Some
markup languages are HTML,LaTex,MathML etc.

What is SGML?

XML’s ancestor is SGML(Standard Generalized MarkupLanguage), which is a system for defining new markup
language. A language that is created using SGML specifications is called SGML application. One such example
of SGML application is HTML because HTML is created using SGML specification.

What is Meta language?

A system that allows for defining new markup language is known as meta language. SGML and XML both can
be termed as meta language.
XML Vs SGML
XML SGML
1. It is based on SGML but did not It was the first generic markup language but
include complex and optional features complex and required overheads to use it.
of SGML.
2. XML retains the primary benefits of
SGML.i.e

XML allows the creation of new


tags/tag-sets

Document describes the data they


contain.

Document can be validated

XML Vs HTML
HTML XML
HTML document formats and displays web XML documents carry data along with their
pages data. description.
HTML tags are predefined. XML tags are not predefined.you can create
and define new tags as per your needs. (meta
(predefine markup language) language)
HTML tags may not have closing tag. XML tags must have a closing tag
HTML tags are not case-sensitive XML tags are case-sensitive
HTML documents are directly viewable in a XML documents can be viewed only if proper
browser. stylsheet file is also available along with
XMLfile.

Note: XML is subset of SGML

HTML+Browser web page XML+stylesheet+Browser web page

XML Vs EDI

Advantages of XML over EDI:

1. Lower cost(xml does not require costly technology like VAN as EDI requires.)

2. Customized Business Rules( xml enables data-storage in a structured format by allowing creation of
customized tags)

3. Easy Interpretation. (xml documents can be easily interpreted using XML-parsers)

4. Platform Independent (xml is platform independent thus it allows businesses to transact with any other
business irrespective of their business platform)
Features of XML

1. XML was designed to carry data, not to display data.

2. XML does not do anything.To make it behave in a particular way, additional files such as CSS files
or XSL files are needed.

3. XML is designed to be self-descriptive

4. XML is free and extensible

5. XML is platform independent

6. XML can separate data from HTML

7. XMl can be used to create new languages


Example : ADML (Architecture Description Markup Language),
BrainML(Brain Markup language),
CML(chemical markup language),
RecipeML(Recipe MarkupLanguage)
8. XML is a W3C Recommendation
W3C forms working group to develop specifications for XML. The recommendations for XML are
available at the URL.

Working in XML:

Example: A company wants to get into hypermarket business on the lines of Big Bazaar of India or Wal-Mart of
USA. It plans to open numerous stores across the country. Data from different stores must be accessible through
various designated locations across the country.

The details of each product such as product’s id-code, its name, product’s description, its price ,its manufacturer
and available quantity in store must be accessible and available for further processing.

PRODUCTDATA

product

ProductID

ProductNAME

ProductDESC

ProductPRICE

ProductMANUFACTURER

ProductQUANTITY
XML code :

<?xml version=”1.0” encoding=”UTF-8” ?>

<PRODUCTDATA>

<PRODUCT>

<ProductID>P01</ProductID>

<ProductName> candlelamp</ProductName>

<ProductDESC> candle lamp with glasswindow</ProductDESC>

<ProductPRICE> 350.00</ProductPRICE>

<ProductMANUFACTURER> Siemas Creations </ProductMANUFACTURER>

<ProductQUANTITY> 80 </ProductQUANTITY>

</PRODUCT>

<PRODUCT>

<ProductID>P02</ProductID>

<ProductName> pocket watch</ProductName>

<ProductDESC> vintage pocket watch with a distinctive fob chain </ProductDESC>

<ProductPRICE> 3600.00 </ProductPRICE>

<ProductMANUFACTURER> Titan </ProductMANUFACTURER>

<ProductQUANTITY> 30 </ProductQUANTITY>

</PRODUCT>

</PRODUCTDATA>

STRUCTURE OF XML DOCUMENT SYSTEM:

1. a style sheet presentation through CSS and XSL

2. a grammar structure through DTD.

3. Semantics of data through XML file.

STRUCTURE OF XML File:


1. a logical structure: it refers to different parts of document.(how it is built)

2. a physical structure: defines what the document contains storage units are termed as Entities. Two
types of entities are Internal and External entities.

Logical Structure of XML Document

Components of XML -file/document:

1. a prolong

i. xml declaration: <?xml version=”1.0” encoding=”UTF-8” standalone=”yes” ?>

ii. processing instruction: <?xml-stylesheet type=”text/css” href=”main.css” ?>

iii. DTD(document type delaration): sets a grammer rule for xml file.

<!DOCTYPE animals SYSTEM=”WIDAnim.dtd” >

it must follow xml declaration proceed the root element.

iv. Comments <!-- -->

v. white space : it refers to spaces, tabs, carriage-returns and blank lines.

2.Data instance :it consist of one or more elements. It is a part of one or more elements. Some time data
instance is also referred to as body.

Elements are means to define individual data items .

Root/Document Element: the parent element of all other elements in data instance is known as root element or
document element.

Child Element: the element nested inside other element are the child elements.

Naming rules in XML:


Name in XML must follow certain rules. These are

i. names in XML must start either with a letter or underscore character.

ii. Rest of the name can consist of letters, digits, underscore character, the dot(.) or a hyphen(-)

iii. Spaces are not allowed in names.

iv. XML is case sensitive

v. Names cannot start with a string “xml”. It is reversed for the XML specification.

vi. By convention HTML elements in XML are written in uppercase, and XML elements are written in
lowercase.
Predefined Entities :

character reference

& &amp;

< &lt;

> &gt;

“ &quot;

' &apos;

CSS (Cascading Style sheet):

Structure of CSS: eg:

selector{ Declaration 1;

declaration 2;

Notes:
Selector : is a name of elements to be styled.

Declaration: styles like color , font-family, font-size, alignment, margin etc.

Format : attribute name: value;

Eg. : color: red; display:block;

Example : PRODUCT { display: block }

ProductID { display : lock; font-family: arial; color:”#008000” }

Validating XML Documents :

A valid XML document is one that is well formed as well as confirms to the DTD or schema.

Software that validate XML documents are

1. XML Validator

2. XML Parser

1. XML Validator are the software packages that check the XML documents as per the specified DTD.

eg. W3C XML validator, Tidy, XML.com's etc.


2.XML parsers are the software packages that are part of bigger application that provide XMLsupport.
eg.Oracle 11 or today's web browser.

The role of an XML parser is to dissect a valid XML document to obtain actual data from the XML
document. The hot favourite of web application , java , also include a built-in XML parser.

Some other XML parser :

Expat, TclExpal, LTXML , Microsoft’s validating XML processor etc.

Validation Process:

XMLvalidator checks whether a well-formed XML document is as per the


specifications laid by DTD or Schema.

Example:
<?xml version=”1.0” ?>

<!DOCTYPE EMAIL [

<!ELEMENT EMAIL (TO,FROM,CC,BCC,SUBJECT,BODY,ATTACHMENT)>

<!ELEMENT TO (#PCDATA)>

<!ELEMENT FROM (#PCDATA)>

<!ELEMENT CC (#PCDATA)>

<!ELEMENT BCC (#PCDATA)>

<!ELEMENT SUBJECT (#PCDATA)>

<!ELEMENT BODY (#PCDATA)>

<!ELEMENT ATTACHMENT (#PCDATA)>

]>

Actual XML markup containing the actual data:

<EMAIL>

<TO>dhanptrai@gmail.com</TO>

<FROM>arora.sumita@gmail.com</FROM>

<CC>ndcc.in@gmail.com</CC>

<BCC> </BCC>
<SUBJECT>my first DTD</SUBJECT>

<BODY> it is the DTD for email structure</BODY>

<ATTACHMENT> it is the DTD for email structure.</ATTACHMENT>

</EMAIL>

Example code:1
AIM: Create an XML document to present following set of data and save as Client.xml.
ClientID Name Company Phone City

XML code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CLIENTS>
<CLIENT>
<ClientID> CO1</ClientID>
<Name> Jane SmiTH </Name>
<Company> ATnT <Company>
<Phone> 2401880152</Phone>
<City> Delhi </City>
<CLIENT>

<CLIENT>
<ClientID> CO2</ClientID>
<Name> Jameel Sheikh </Name>
<Company> NIIT <Company>
<Phone> 800102205</Phone>
<City> Mumbai </City>
<CLIENT>

<CLIENT>
<ClientID> CO3</ClientID>
<Name> Raghav Seth</Name>
<Company> Wipro <Company>
<Phone> 3014980912 </Phone>
<City> Banglore </City>
<CLIENT>
</CLIENTS>

Code :2
AIM: a) Create an XML document to represent various computer parts . Each part has its item name,
manufacturer, model and cost. Choose data of your choice and save the file as computer.xml
XML code:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<?xml-stylesheet type="text/css" href="parts.css" ?>
<PARTS>
<TITLE>computer parts </TITLE>
<PART>
<PARTNAME> mother board </PARTNAME>
<MANUFACTURER> ASUS </MANUFACTURER>
<MODLE> P3B-F </MODLE>
<COST> 12300.00 </COST>
</PART>
<PART>
<PARTNAME> Video card </PARTNAME>
<MANUFACTURER> ATI </MANUFACTURER>
<MODLE> All-in-wonder-Pro</MODLE>
<COST> 1600.00 </COST>
</PART>
<PART>
<PARTNAME> sound card </PARTNAME>
<MANUFACTURER> Creative Labs</MANUFACTURER>
<MODLE> sound blaster live </MODLE>
<COST> 800.00 </COST>
</PART>
<PART>
<PARTNAME> 17 inch Monitor </PARTNAME>
<MANUFACTURER> LG Electronics </MANUFACTURER>
<MODLE> 995E </MODLE>
<COST> 22900.00 </COST>
</PART>
</PARTS>
AIM: b) Create a CSS style-sheet for the xml document file “computer.xml” and
save style-sheet file as “parts.css”.
CSS code:
PARTS {display: block }
TITLE {display: block; font-family: arial ; color:#008000; font-weight:600 ; font-size: 16 ; margin-top: 12pt ;
margin-left: 10pt; text-align: center}
PART {display: block}
PARTNAME {display: block; font-family: arial ; color:#600060; font-weight: 400 ; font-size: 14;
margin-top: 10pt ; margin-left: 30pt}
MANUFACTURER {display: block; font-family: arial ; color:#006000; font-weight:400 ;
font-size: 14 ; margin-top: 10pt ; margin-left: 30pt}

MODEL {display: block; font-family: arial ; color:#000080; font-weight:400 ; font-size: 14 ;


margin-top: 10pt ; margin-left: 30pt}
COST {display: block; font-family: arial ; color:#800000; font-weight:400 ; font-size: 14 ;
margin-top: 5pt ; margin-left: 30pt}

You might also like