Lab Manuals WT
Lab Manuals WT
Lab Manual
WEB Technology
A simplified practical work book of WEB DESIGN AND DEVELOPMENT course
for Computer Science, Information Technology and Software Engineering
students
Student Name:______________________________________
Registration No:___________________________________
Task #1.1
- Heading
- Underline
- Italic
- bold
- Paragraph
- Image
- Horizontal line
- Center
- Line break
LAB# 2
Lists:
You can create three types of lists in HTML:
- Unordered lists , which are like lists of bullet points
- Ordered lists , which use a sequence of numbers or letters instead of bullet
points
- Definition lists , which allow you to specify a term and its definition
Unordered List (<ul>)
If you want to make a list of bullet points, you write the list within the < ul
>element (which stands for unordered list). Each bullet point or line you want to
write should then be contained between opening < li >tags and closing < /li >tags
(the li stands for list item).
Tag Description
defined via <tr> tag. Table header is defined with the <th> tag while table
data/cell is defined with the <td> tag.
TASK # 3.1
Write HTML code for given web page. You must use “table” tag and
“colspan” attribute to design given tables.
TASK# 3.2
Write HTML code to design given table. You must use “colspan” and
“rowspan” attribute to achieve desired results.
TASK # 3.3
Write HTML code to design given web page. Use table tag with following
attributes to achieve desired goal.
- Image
- Background color
- Align
- Rowspan
- colspan
TASK # 3.4:
Write HTML code to design given web page. Use table tag to design web
page.
LAB # 4
LINKS:
Links are used to navigate from one portion of web site to other portion.
Navigation can be within same page, or from one page to another page. Or
from one page to another page at some specific portion.
1- External links
2- Internal links
3- External Internal links
- PAKISTAN.HTML
- PROVINCES.HTML
- RIVERS.HTML
- LAKES.HTML
Main page is Pakistan.html, which have links to other pages. When user
clicks on Provinces, it must navigate to provinces.html. When user clicks on
rivers, it must navigate to rivers.html. When user clicks on lakes, it must
navigate to lakes.html.
Each sub page (provinces, rivers, lakes) have a link of HOME page
(Pakistan.html) at the end of web page. When user clicks on home text, it
must navigate back to PAKISTAN.html.
INDEX.HTML
PROVINCES.HTML
LAKES.HTML
RIVERS.HTML
TASK # 4.2:
Write HTML code to design given web page. It contains details about
provinces and lakes of Pakistan. At the start of page, a list is maintained
about provinces and lakes of Pakistan. Details of all the material is
mentioned below the list. Whenever user clicks on any link, it must navigate
to that specific portion of the page i.e. if user clicks on banjosa, system must
scroll down the page automatically and navigate to BANJOSA lake details.
TASK # 4.3
- OLX.HTML
- MOBILE.HTML
- PC.HTML
OLX.HTML is index page which contains a list of mobiles and pc’s. When user
clicks on MOBILES, system must navigate to MOBILES.HTML page. When
user clicks on SAMSUNG, system must navigate to SAMSUNG portion on
MOBILES.HTML.
OLX.HTML
PC.HTML
MOBILE.HTML
LAB#5
TASK # 5.1:
Write HTML code to design given web page. Following are the pages
- PAKISTAN.HTML
- CITIES.HTML
PAKISTAN.HTML
LAB#6
A frameset divides the window into rows and columns (rather like a table).
The simplest of framesets might just divide the screen into two rows,
whereas a complex frameset could use several rows and columns.
The < frameset >element contains a < frame >element for each frame of
the document (each cell of thegrid constructed by the < frameset >element)
and a < noframes >element to indicate what should bedisplayed if the user’s
browser does not load frames.
TASK #6.1:
Write HTML code to design given page which is divided into 3 frames on the
basis of rows. Also design 3 pages with “HEADER.HTML”, “CONTENT.HTML”
and “FOOTER.HTML”.
FRAME.HTML
TASK#6.2:
Write HTML code to design given web page in frames. There are three
frames designed. Header, Left panel and content frame.
Similarly for laptops and tablets, when user clicks on any list item, its
relevant page must be displayed in “Content” frame.
INDEX.HTML (FIGURE 1)
MOBILE.HTML (FIGURE 2)
TASK #6.3
FRAME BLOCKS.HTML
LAB # 7
Introducing CSS
CSS works by allowing you to associate rules with the elements that appear in a
web page. These rulesgovern how the content of those elements should be
rendered. CSS rule is made up of two parts:
- The selector , which indicates which element or elements the declaration
applies to (if it applies tomore than one element, you can have a comma -
separated list of several elements)
- The declaration , which sets out how the elements referred to in the
selector should be styled
Inline CSS:
- STYLE keyword is used inside of an HTML tag as an attribute
Internal CSS:
- STYLE is used as a tag in head portion of HTML code
External CSS:
- A new file is created with .css extension, and that file is linked to our HTML
page.
TASK # 7.1
Write HTML and CSS code to implement given design using inline CSS.
NOTE: only use <p> and <br> html tags. You must use CSS properties to
design given web page.
TASK # 7.2
Write HTML and CSS code to implement given design using INTERNAL CSS.
NOTE: only use <p> and <br> html tags. You must use CSS properties to
design given web page.
TASK # 7.3
Write HTML and CSS code to implement given design using EXTERNAL CSS.
NOTE: only use <p> and <br> html tags. You must use CSS properties to
design given web page.
TASK # 7.4
Write HTML code to design given web page. There are three portion of the
given file.
1- INLINE
2- INTERNAL
3- EXTERNAL
You must design inline portion with “inline” CSS, Internal portion with
“Internal” CSS and external portion with “External” style sheet.
CSS.HTML
LAB # 8
DIV:
The <div> tag defines a division or a section in an HTML document.
The <div> tag is used to group block-elements to format them with CSS.
TASK # 8.1
Write a HTML code to design given web page. You must use <div> tag to
design given boxes.
DIVS.HTML
TASK# 8.2:
Write HTML and CSS code to design given web page. You must use css
“float” property to achieve given task.
FLOAT.HTML
TASK# 8.3
Write HTML code to design given web page using div and css.
TASK# 8.4
Write HTML code to design given web page using div and css.
LAB # 9
TASK #9.1:
Write HTML code to design given web page. You must use position property
with values “fixed”, “absolute” and relative.
POSITION.HTML
TASK #9.2:
Write HTML and CSS code to design given navigation bar. Given navigation
bar must be implemented by using LIST tag of HTML. List item “courses” and
“projects” has sub list which are hidden. Whenever mouse moves on these
both, sub-list must appear in vertical. As shown in figures
FIGURE 1
FIGURE 2
FIGURE 3
LAB# 10
TASK #10.1
Write a JavaScript code that inputs two numbers from user and an operator
from user. If user enters an arithmetic operator, than apply operator on two
numbers and display result. Otherwise display invalid operator.
TASK #10.2
Write a JavaScript code that inputs numeric values from user. When user
press‘s’, system must stop taking values from user. Store all values given by
user in an array. And perform following math functions on all values of
array.
- Square
- Log
- COS
- SIN
- TAN
- Under Root
TASK#10.3
Write a HTML code that must display given design. When user click on any
of the buttons, a function must be called and take two numeric values from
user. And display output on an “alert” dialogue box with respect to button
pressed.
Figure 1
Figure 2
TASK #11.2
Write a HTML code that must display following design. Perform following
functionality.
1- When user click on “Change Background” button, system must input
color from user and apply that color to background of head div.
2- Whenever mouse is moved to left div, its opacity must be set to 50%,
and whenever mouse is moved out from left div, opacity must be set
to normal.
3- Whenever mouse is moved to Content div, another div named “txt”
must be shown, and whenever mouse is moved out from Content div,
“txt” div must hide.
FIGURE 1
TASK # 11.3
Write a HTML code that displays following image on web page. Write
JavaScript code that must implement given functionality.
Whenever mouse is moved on the picture, it must fade out to 50%. Your
must use JavaScript DOM functions not jquery.
Figure 1
Figure 2
TASK # 11.3
Write HTML code that displays following layout of web page. Write
Bootstrap code that must implement given design.
LAB # 12
TASK #12.1
Write a HTML code which must display three images in a row as shown in
figure. On click event of button, each image must move to next image box.
ie, image of box1 should move to box 2, image of box2 should move to box3
and image of box3 should move to box1. And this process must repeat itself
after 2 seconds.
FIGURE 1
TASK #12.2
Write a HTML code which must display following form. Given are the
eligibility criteria for male and female candidates.
For Male candidates:
- Age must be above 30
- He must have experience in Database projects
For Female candidate:
- Age must be between 18 and 30
- She must have experience in Management projects;
If candidate is eligible for job, display “Eligible” in the green div. otherwise
display “Not Eligible” in green div.
TASK # 13.3
Write HTML code to design given web page and write JavaScript code to
validate values in the text fields. When user click “SEND” button, system
must check rules. If all rules are valid, system must display “Well Done”. If
any of rules is violated, system must display errors in an alert box. On
clicking clear button, all fields must be set to empty. Rules are given below
1- User must enter name and it must contain only alphabets.
2- Zip Code must be digits and must not exceed 6 digits.
3- User must select some country.
4- User must select gender.
5- User must select at least one from preferences.
6- Phone number must be a digit and it must start with “03” and must
have 11 digits.
7- Email must contain “@” symbol and “.com” at the end
8- Password must contain an Upper case alphabet, a Lower case
alphabet, a special character and a digit. And it must be between 6-8
characters.
9- Password and verify password must match.
LAB # 13
TASK 1:
Write a HTML code to design following web page. Write a jquery code which
must open a panel whenever mouse is moved to given green div.On click
even of button which is given at the end of web page, a yellow div must
emerge from left of web page and slide in 2 seconds. On clicking again on
button, yellow div must slide back and disappear.
Slider div is shown in Figure 2.
FIGURE 1
FIGURE 2
FIGURE 3
TASK #13.2
Write a code in HTML to design given web page. Also write a jQuery code
that must fade given image on mouse over function. On mouse over event
on image, “PAKISTAN” text must slide down from top in 0.5 seconds (as
shown in figure 2). And when mouse moves away from image, “PAKISTAN”
must slide top and hide and faded shade must disappear.
FIGURE 1
FIGURE 2
TASK #13.3
Write a code which must add 3 images on a web page but display only first
image. On page load, jQuery cycle function must be called and a slider of
images must start, which must change images in ‘fade’ pattern.
LAB # 14
TASK #14.1
Design given form in HTML, and perform following tasks
1- On “Input Employee” button click, system must input (prompt) Id,
name, age and city from user and save all values in a JSON array.
2- On “Display All Employees” button click, all values saved in JSON array
must be displayed in table as given below.
TASK 2:
Write a HTML code and design given web page. Create three JSON arrays
naming “ADMIN”, “MANAGEMENT” and “CS”. And perform given task
1- On “Input Employee” button click, system must take two values from
user and store in respective array. Two values are
a. Employee Type ( admin/management/CS)
b. Employee Name
2- On “Display All Employees” button click, system must display
employees of all departments in an ordered list in given format.
LAB # 15
TASK 1:
On click event of “Display All Students” button, data of student table from
database must be displayed on web page in a table in given format.