73
ANAND INSTITUTE OF HIGHER TECHNOLOGY KAZHIPATTUR, CHENNAI-603 103. DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING CS2358-INTERNET PROGRAMMING LAB LAB MANUAL Prepared by, Mr.S.Praveen Kumar,AP/CSE

IP MANUAL

Embed Size (px)

DESCRIPTION

cs2359

Citation preview

ANAND INSTITUTE OF HIGHER TECHNOLOGY

KAZHIPATTUR, CHENNAI-603 103.

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

CS2358-INTERNET PROGRAMMING LAB

LAB MANUAL

Prepared by,Mr.S.Praveen Kumar,AP/CSE

Ms.R.Femila Goldy,AP/CSE

CS2358 INTERNET PROGRAMMING LAB

L T P C1 0 3 2LIST OF EXPERIMENTS1. Create a web page with the following using HTML

i) To embed an image map in a web page

ii) To fix the hot spots

iii) Show all the related information when the hot spots are clicked.

2. Create a web page with all types of Cascading style sheets.

3. Client Side Scripts for Validating Web Form Controls using DHTML

4. Write programs in Java to create applets incorporating the following features:

5. Create a color palette with matrix of buttons. Set background and foreground of the control text area by selecting a color from Color palette.

In order to select Foreground or background use check box control as radio buttons

To set background images

6. Write programs in Java using Servlets:

To invoke servlets from HTML forms

To invoke servlets from Applets

7. Write programs in Java to create three-tier applications using JSP and Databases

for conducting on-line examination.

for displaying student mark list. Assume that student information is available in a

database which has been stored in a database server.

8. Programs using XML Schema XSLT/XSL

9. Programs using AJAX

10. Consider a case where we have two web Services- an airline service and a travel

agent and the travel agent is searching for an airline. Implement this scenario using Web

Services and Database.Ex. No. 1STUDY OF BASIC HTML TAGS

AIM:

To study basic HTML tags

Basic tags 1. and

Purpose: Indicates the beginning and the end of an HTML document

2. and

Purpose: Indicates the beginning and the end of an Header section of a document

3. and

Purpose: Specifies the text that should appear on the title bar of a browser window

4. and

Purpose: Indicates the beginning and the end of the documents content

5. and

Purpose: Headings are defined within these tags

defines the largest heading

defines the smallest heading

6. and

Purpose: Indicates the beginning and end of a paragraph in a HTML document

7.

Purpose: Inserts a line break without the need to start a new paragraph

8.

Purpose: The comment tag, which indicates the browser that the text enclosed within the tag, should be ignored 9.

Purpose: Defines a Horizontal rule, inserts a line in the page

Text Formatting tags 10. and

Purpose: Displays the text enclosed with these tags in Bold

11. and

Purpose: Displays the text enclosed with these tags in Italics

12. and

Purpose: Displays the text enclosed with these tags in bigger size

13. and

Purpose: Displays the text enclosed with these tags in smaller size

14. and

Purpose: Displays the text enclosed with these tags as a subscript

15. and

Purpose: Displays the text enclosed with these tags as a superscript

16. and

Purpose: Displays the text enclosed with these tags in specified font

Anchor tag 17. and

Purpose: HTML uses the (anchor) tag to create a link to another document.

An anchor can point to any resource on the Web

Attributes: 1. HREF - Addresses the document to link to

2. TARGET Defines where the linked document should be displayed

Frames 18. and

Purpose: Defines how to divide the window into frames

Attributes: 1. COLS No: of columns the window should be divided into

2. ROWS No: of rows the window should be divided into

19. and

Purpose: Defines the page to be displayed in the frame

Attributes: 1. SRC The web page that should be displayed in the frame

2. NAME The name of the frame where other pages are displayed

Tables 20. and

Purpose: Defines a table

Attributes: 1. CELLSPACING Spacing between two cells in table

2. CELLPADDING Spacing between cell and its contents 3. BORDER Defines the border of the table

21. , , and , ,

Purpose: Defines a row, a heading and a cell respectively Lists 22.

  1. and

Purpose: Defines an ordered list of items, marked by numbers

23.

  • and

Purpose: Defines an unordered list of items, marked by bullets

24. and

Purpose: Defines a list item

25. and

Purpose: Denotes a list of definitions

26. and

Purpose: Denotes a definition item in the definition list

27. and

Purpose: Denotes a definition for a definition item in the definition list

Forms 28. and

Purpose: Indicates the beginning and the end of a form, contains form elements

Attributes: 1. NAME Name given to the form

2. ACTION URL to be redirected to, when form is submitted

3. METHOD Get or post methods, to post values

29. and

Purpose: Indicates an input element in a form Attributes: 1. TYPE Specifies the type of input element

2. NAME Specifies the name associated to the input element

3. VALUE Specifies the value assigned to the input element

30. and

Purpose: Defines a Text area, a larger text box with specified rows and columns

31. and

Purpose: Defines a selectable list of items (a drop down box)

32. and

Purpose: Defines an option in the selectable list of items

33. and

Purpose: Defines a push button in the form

34. and

Purpose: Defines a submit button for the form, to submit input elements values

Images 35. and

Purpose: Defines an image in the document

Attributes: 1. SRC The image file to be displayed

2. ALT Displays alternate text, if the browser doesnt load imagesEx. No. 2IMAGE MAPPING

AIM:

To write the html code to perform the Image Mapping.

DESCRIPTION:usemap attribute specifies an image as a client-side image-map (an image-map is an image with clickable areas)

Syntax

ValueDescription

#mapname

A hash character ("#") plus the name or id of the element to use

Defines an image-mapAttribute:

name

creates a relationship between the image and the map

associated with the 's usemap attribute

Defines a clickable area inside an image-map.

element is always nested inside a tag

Attribute:

alt

specifies an alternate text for an area, if the image cannot be displayed.

Syntax

target

Specifies where to open the target URLSyntax

Attribute Values

ValueDescription

_blankOpens the linked document in a new window or tab

_self

Opens the linked document in the same frame as it was clicked

_parentOpens the linked document in the parent frame

_top

Opens the linked document in the full body of the window

frame nameOpens the linked document in a named frame

coords

Specifies the coordinates of an area in an image-map.

Syntax

ValueDescription

x1,y1,x2,y2 Specifies the coordinates of the left, top, right, bottom corner of the rectangle (for shape="rect")

x,y,radiusSpecifies the coordinates of the circle center and the radius (for shape="circle")

x1,y1,x2,y2,..,xn,ynSpecifies the coordinates of the edges of the polygon. If the first and last coordinate pairs are not the same, the browser will add the last coordinate pair to close the polygon (for shape="poly")

href

specifies the hyperlink target for the area.ValueDescription

URLPossible values:

An absolute URL - points to another web site (like href="http://www.example.com/sun.htm")

A relative URL - points to a file within a web site (like href="sun.htm")

Shape

Specifies the shape of the area

Syntax

ValueDescription

default

Specifies the entire region

rectDefines a rectangular region

circleDefines a circular region

polyDefines a polygonal region

PROGRAM:

Usemap.html

Ooty.html

Kochi.html

Kashmir.html

OUTPUT:

Ex. No. 3WEB PAGE CREATION USING TYPES OF CSS

AIM:

To create a webpage with all types of Cascading style sheets with HTML pages.

DESCRIPTION:

CSS has been added to HTML to give web developers

To get more control over their design and content layout.

To create a standard set of commands to control the styles of all the subsequent pages.

Web site designed in the CSS are faster to change and update.

Communication among multiple developers easier with CSS.

INSERTING A STYLE SHEET:

External Style Sheet

Internal Style Sheet

Inline Style

External Style Sheet:

Ideal for cases when the style is applied to many pages.

Look of an entire web page/site can be changed by changing one file.

Each page must link to the style sheet using the tag

The tag goes inside the head section.

Example:

Embedded (or Internal) Style Sheet: Should be used when a single document has a unique style

Defined in the head section with the tag.

Example:

body{background-color:red}

p{margin-left:20px}

Inline Style:

Should be used when a unique style is to be applied to a single occurrence of an element.

Use style attribute can contain any css property.

Example:

this is a paragraphFirst.html

Pick ur Ice Cream

Select your Favourite Icecream


1.html

cone

h1{color=blue;}

h2{color=green;}

h3{color=red;}

p{color=blue;}




Cone Ice Creams are....Mmmm....

most ideal for all ages!

click here for orders...

Enjoy the taste!!!

Sundae.html

sundae

Welcome!