IWP Lab Manual
IWP Lab Manual
Laboratory Manual
On
For
FOREWORD
year
keeping in view the vast coverage required for understanding the concept of Hyper
Text Markup Language(HTML) and JavaScript.
As a student, many of you may be wondering with some of the questions in your
mind regarding the subject and exactly what has been tried is to answer through
this manual.
As you may be aware that MGM has already been awarded with ISO 9000
certification and it is our endure to technically equip our students taking the
advantage of the procedural aspects of ISO 9000 Certification.
Faculty members are also advised that covering these aspects in initial stage itself,
will greatly relived them in future as much of the load will be taken care by the
enthusiasm energies of the students once they are conceptually clear.
Dr. S.D.Deshmukh,
Principal
This manual is intended for the Second year students of Computer Science &
Engineering in the subject of Introduction To Web Programming. This manual
typically contains practical/Lab Sessions related HTML and Javascript covering
various aspects related the subject to enhanced understanding.
Introduction To Web Programming provides students the idea of Design
Webpages.It also helps to understands the concept of Javascript programming in
designing a webpage
Students are advised to thoroughly go through this manual rather than only topics
mentioned in the syllabus as practical aspects are the key to understanding and
conceptual visualization of theoretical aspects covered in the books.
Good Luck for your Enjoyable Laboratory Sessions
M.K. Ugale
HOD,CSE
Lecturer in CSE
SUBJECT INDEX
1. Design a home page which will display your information i.e. Bio data.
2. Create Hyperlinks in home page i.e educational details, Hobbies,
Achievement, My Ideals etc.
3. Design a timetable and display it in tabular format.
4. Design a Registration form in HTML.
5. Design a webpage i.e. Biodata using CSS.
6. Design webpage using Frames,Framesets.
7. Embedding Javascripts in HTML pages.
8. Design a Biodata page whose content can be changed using JavaScript
like events.
9. Design a Signup form with all validations.
2. All the students should sit according to their roll numbers starting from their left
to right.
3. All the students are supposed to enter the terminal number in the log book.
5.
All the students are expected to get at least the algorithm of the
program/concept to be implemented.
1. Lab Exercise
Exercise No 1: (2 Hours) 1 Practical
Aim: - Design a home page which will display your information i.e. Bio data.
Tools: Notepad Editor and Web Browser like Internet Explorer or Mozilla Firefox.
Standard Procedure for Creating and View an HTML document?
1. Use a text editor such as Notepad to write the document.
2. Save the file as filename.html on a PC. This is called the Document Source.
3. Open the file that you have saved in any browser Off-Line.
4. Your HTML page should now appear just like any other Web page in browser.
5. You may now switch back and forth between the Source and the HTML
Document
switch to Notepad with the Document Source
make changes .
save the document again.
switch back to browser .
click on RELOAD and view the new HTML Document .
switch to Notepad with the Document Source.
THEORY:
1. What is HTML?
A series of tags that are integrated into a text document.
A series of tags that are integrated into a text document.
These look like: <code>formatted text</code>
o <code> begins the formatting tag.
o </code> ends the formatting tag.
These tags are then read by a Browser, which translates the tags into the
formatting that they represent
2. What are Tags?
HTML tags are used to mark-up HTML elements.
HTML tags are surrounded by the two characters < and >.
The surrounding characters are called angle brackets .
HTML tags normally come in pairs like <b> and </b>.
The first tag in a pair is the start tag, the second tag is the end tag.
The text between the start and end tags is the element content .
1
HTML tags are not case sensitive, <b> means the same as <B>.
3. Structure Tags In HTML
HTML Tag
<HTML></HTML>
These tags begin and end an HTML document.
HEAD Tag
<HEAD></HEAD>
These tags are in the beginning of the document. Important information is
stored in- between these tags including: title, meta-data, styles, and
programming scripts
TITLE Tag
<TITLE></TITLE>
These tags are in-between the HEAD tags and contain the text that
appears in the title of the Web page.
BODY Tag
<BODY></BODY>
As you may have guessed, the BODY tags contain all the text in the
body of the document.
4. Block Level tags
4.1 HTML Headings
Headings are defined with the<h1> to<h6> tags.
Where <h1> -Defines the largest headings.
<h6> -Defines the smallest headings.
4.2 HTML Paragraphs Paragraphs are defined with the<p> tag.
4.3 HTML Line Breaks Use the <br/> tag if you want a line break (a new line) without starting a
new paragraph.
4.4 Horizontal Rule
The <hr> element is used for horizontal rules that act as dividers between
sections
Description
<b>
<big>
<em>
<i>
<small>
<strong>
<sub>
<sup>
<ins>
<del>
CONCLUSIONS:
In this way we can use different basic tags of HTML for creating webpage
displaying personal information i.e. Biodata.
2. Lab Exercise
Exercise No 2: (2 Hours) 1 Practical
Aim: - Create Hyperlinks in home page i.e. educational details, Hobbies,
Achievement, My Ideals etc.
Tools: Notepad Editor and Web Browser like Internet Explorer or Mozilla Firefox.
STANDARD PROCEDURE:
THEORY:
HTML uses the <a> anchor tag to create a link to another document or web page.
The Anchor Tag and the Href Attribute
An anchor can point to any resource on the Web: an HTML page, an image,
a sound file, a movie, etc. The syntax of creating an anchor:
<a href="url">Text to be displayed</a>
The <a> tag is used to create an anchor to link from, the href attribute is
used to tell the address of the document or page we are linking to, and the
words between the open and close of the anchor tag will be displayed as a
hyperlink.
The Target Attribute
With the target attribute, you can define where the linked document will be
opened. By default, the link will open in the current window.
The code below will open the document in a new browser window.
<a href=http://www. google.com/ target="_blank">Visit google!</a>
Email Links
4
To create an email link, you will use mailto: plus your email address. Here is
a link to ACC's Help Desk:
<a href="mailto:[email protected]">Email Help Desk</a>
To add a subject for the email message, you would add ?subject= after the
email address. For example:
<a href="mailto:[email protected]?subject=Email Assistance">Email Help
Desk</a>
CONCLUSIONS:
With the help of given procedure and information about the Links we can write
HTML code for creating Hyperlinks in html page.
3. Lab Exercise
5
Output-
CONCLUSIONS:
With the help of given information about the Table and Table tags we can design a
time table in tabular format.
4. Lab Exercise
8
Dropdown list:
1. SELECT tag - Defines the controls for selection of options and
creates a dropdown list.
9
Textarea:
For Example10
<form>
<textarea rows = "10" cols = "30" >
this is an example of textarea , a user can input a text in this area
</textarea>
</form>
Output-
CONCLUSIONS:
With the help of given information we can design a Registration form by suing
form tag and attributes.
5. Lab Exercise
11
Tools: Notepad Editor and Web Browser like Internet Explorer or Mozilla Firefox.
THEORY:
hr {color:sienna;}
p {margin-left:20px;}
body {background-image:url("images/Blue hills.jpg");}
</head>
</html>
CONCLUSIONS:
With the help of given information about CSS we can create webpage using css.
6. Lab Exercise
Exercise No 6: (2 Hours) 1 Practical
14
Tools: Notepad Editor and Web Browser like Internet Explorer or Mozilla Firefox.
STANDARD PROCEDURE:
THEORY:
With Frames, you can display more than one HTML document in the same
browser window.
Each HTML document is called a frame.
Each frame is independent of Each Other.
The Frameset Tag The <frameset> tag defines how to divide the window into frames.
Each Frameset Defines a set of rows or columns.
The values of rows/columns indicate the amount of screen area each
row/column will occupy.
The frameset column size value can also be set in pixels (cols=200,500),
and one of the columns can be set to use the remaining space
(cols=25%,*)
The Frame TagThe <frame> tag defines what HTML document to put into each frame.
The second column is set to 75% of the width of the browser window.
The HTML document frame1.html is put into first column and
The HTML document Frame2.html is put into the second column.
<html>
<frameset cols = "40% , 60%">
<frame src = "frame1.html ">
<frame src = "frame2.html ">
</frameset>
</html>
Noresize Attribute in Frame Tag If a frame has visible borders, the user can resize it by dragging the border.
To prevent a user from doing this, you can add noresize=noresize to the
<frame> tag.
Iframe Tag Defines an inline sub window (frame).
For Example<html>
<iframe src="frame1.html"></iframe><br>
<iframe src="frame2.html"></iframe>
</html>
CONCLUSIONS:
With the help of given procedure and information about the Frame we design a
webpage having multiple frames view for displaying subject information.
7. Lab Exercise
Exercise No 7: (2 Hours) 1 Practical
16
17
JavaScript has three different types of popup box available for you to use. Here
they are:
AlertDisplays a message to the user.
For E.g.
alert(Hello this is alert!);
Output-
Confirm
Asks the user to confirm something. Often, this is in conjunction with another
(potentially significant) action that the user is attempting to perform.
For E.g.
confirm('Hello this is confirm popup!');"
Output-
Prompt
18
CONCLUSIONS:
With the help of given procedure and information about the variables and function
of javascripts,we can embed javascript in html pages.
8. Lab Exercise
19
CONCLUSIONS:
20
With the help of given information about the use of Events, We can change the
contents of html pages using JavaScript.
9. Lab Exercise
Exercise No 9: (2 Hours) 1 Practical
21
STANDARD PROCEDURE:
Step 1: Design a signup form.
Step 2: When user click on Submit/Button-Prompt should be displayed.
CONCLUSIONS:
With the help of given information about the use of Events and Functions , We can
Design a Signup form with all validations
22
23