Lab Manual_SWD_2023-24_EVEN
Lab Manual_SWD_2023-24_EVEN
Laboratory Manual
(Static Webpage Design)
(4311603)
Institute’s Vision:
To cater skilled engineers having potential to convert global challenges into opportunities
through embedded values and quality technical education.
Institute’s Mission:
M1: Impart quality technical education and prepare diploma engineering professionals to
meet the need of industries and society.
M2: Adopt latest tools and technologies for promoting systematic problem solving skills to
promote innovation and entrepreneurship
M3: Emphasize individual development of students by incalculating morals, ethical and life
skills.
Department’s Vision:
Develop globally competent Computer Engineering Professionals to achieve excellence in an
environment conducive for technical knowledge, skills, moral values and ethical values with
a focus to serve the society.
Department’s Mission:
M1: To provide state of the art infrastructure and facilities for imparting quality education
and computer engineering skills for societal benefit.
M2: Adopt industry oriented curriculum with an exposure to technologies for building
systems & application in computer engineering.
M3: To provide quality technical professional as per the industry and societal needs,
encourage entrepreneurship, nurture innovation and life skills in consonance with latest
interdisciplinary trends.
A. V. PAREKH TECHNICAL INSTITUTE, RAJKOT
Certificate
Place:……………..
Date: ……………………
Signature of Faculty
Static Webpage Design (4311603)
Preface
The primary aim of any laboratory/Practical/field work is enhancement of required skills as
well as creative ability amongst students to solve real time problems by developing relevant
competencies in psychomotor domain. Keeping in view, GTU has designed competency focused
outcome-based curriculum -2021 (COGC-2021) for Diploma engineering programmes. In this more
time is allotted to practical work than theory. It shows importance of enhancement of skills amongst
students and it pays attention to utilize every second of time allotted for practical amongst Students,
Instructors and Lecturers to achieve relevant outcomes by performing rather than writing practice in
study type. It is essential for effective implementation of competency focused outcome- based Green
curriculum-2021. Every practical has been keenly designed to serve as a tool to develop & enhance
relevant industry needed competency in each and every student. These psychomotor skills are very
difficult to develop through traditional chalk and board content delivery method in the classroom.
Accordingly, this lab manual has been designed to focus on the industry defined relevant outcomes,
rather than old practice of conducting practical to prove concept and theory.
By using this lab manual, students can read procedure one day in advance to actual
performance day of practical experiment which generates interest and also, they can have idea of
judgement of magnitude prior to performance. This in turn enhances predetermined outcomes amongst
students. Each and every Experiment /Practical in this manual begins by competency, industry relevant
skills, course outcomes as well as practical outcomes which serve as a key role for doing the practical.
The students will also have a clear idea of safety and necessary precautions to be taken while
performing experiment.
This manual also provides guidelines to lecturers to facilitate student-centered lab activities for
each practical/experiment by arranging and managing necessary resources in order that the students
follow the procedures with required safety and necessary precautions to achieve outcomes. It also
gives an idea that how students will be assessed by providing Rubrics.
Internet is widely used in different areas such as banking, e-commerce, education and many
others. Different technologies are used to develop web applications but HTML is the core component
in all types of applications for formatting and presenting the web content. This course will impart skill
sets related to designing HTML web pages, using cascading style sheets and embedding Java script
using Kompozer. This course will also serve as a pre-requisite for the advanced web development
technologies, which students will learn in the upcoming semester.
Although we try our level best to design this lab manual, but always there are chances of
improvement. We welcome any suggestions for improvement.
4 | Page
Static Webpage Design (4311603)
1. Basic and Discipline specific knowledge: Apply knowledge of basic mathematics, science
and engineering fundamentals and engineering specialization to solve the engineering
problems.
2. Problem analysis: Identify and analyse well-defined engineering problems using codified
standard methods.
4. Engineering Tools, Experimentation and Testing: Apply modern engineering tools and
appropriate technique to conduct standard tests and measurements.
7. Life-long learning: Ability to analyze individual needs and engage in updating in the context
of technological changes in field of engineering.
5 | Page
Static Webpage Design (4311603)
b. CO2: Use advanced HTML tags for designing interactive and semantic web pages.
d. CO4: Use CSS internal and/or external style sheets for designing web pages.
6 | Page
Static Webpage Design (4311603)
7 | Page
Static Webpage Design (4311603)
The following industry relevant skills are expected to be developed in the students
by performance of experiments of this course.
Marks
Sr no Practical Outcome/Title of experiment Page Sign
Date (25)
9
a. To create a student registration webpage using
different HTML form elements.
b. To create student feedback form using different
HTML form elements.
Demonstrates exceptional
proficiency in laboratory work and
Excellent (23-25) questionnaire assessments,
consistently applying skills and
understanding effectively.
Shows a strong command of both
laboratory work and questionnaire
Proficient (18-22)
assessments, with minor areas for
improvement.
Achieves a satisfactory level of
Laboratory
performance in laboratory work and
Work and
Satisfactory (13-17) questionnaire assessments, with
Questionnaire
room for improvement in some
areas.
Demonstrates limited proficiency in
Needs both laboratory work and
(8-12)
Improvement questionnaire assessments, with
significant areas for improvement.
Fails to meet acceptable standards in
both laboratory work and
Inadequate (0-7)
questionnaire assessments;
significant improvement is required.
Static Webpage Design (4311603)
*Note: This Rubric is applied to the ESE Components of the Courses where End Semester Examination is
conducted by Institute Faculty Internally. For the Final Year Courses, ESE Exam is conducted by an External
Faculty appointed by university. So, for those courses the marks are converted from the GTU Grade and
equally divided into all the Cos.
Static Webpage Design (4311603)
Practical No.1: Use HTML text formatting tags to create web page as per given
sample.
A. Objective:
To apply text formatting tags in a webpage.
B. Expected Program Outcomes (POs)
1. PO1: Basic and Discipline specific knowledge: Be able to apply
engineering knowledge of computing appropriate to the
problem
2. PO4: Engineering Tools, Experimentation and Testing: Be able
to use and apply current technical concepts and best practices in
information technologies
E. Practical Outcome(PRo)
Use HTML text formatting tags to create web page as per given sample.
G. Prerequisite Theory:
HTML ELEMENTS:
1 | Page
Static Webpage Design (4311603)
You can add comments to your HTML source by using the following
syntax:
Note: Comments are not displayed by the browser, but they can
help document your HTML source code.
2 | Page
Static Webpage Design (4311603)
Signature of Faculty
3 | Page
Static Webpage Design (4311603)
Practical No.2: Use hyper link tag to navigate through different web
pages as per given sample.
A. Objective:
To apply hyperlinks in a webpage.
B. Expected Program Outcomes (POs)
1. PO1: Basic and Discipline specific knowledge: Be able to
apply engineering knowledge of computing appropriate
to the problem
2. PO4: Engineering Tools, Experimentation and Testing:
Be able to use and apply current technical concepts and
best practices in information technologies
E. Practical Outcome(PRo)
Use hyper link tag to navigate through different web pages as per
given sample.
4 | Page
Static Webpage Design (4311603)
5 | Page
Static Webpage Design (4311603)
Signature of Faculty
6 | Page
Static Webpage Design (4311603)
Practical No.3: Use image tags to create web page as per given sample.
A. Objective:
To place image in a webpage.
B. Expected Program Outcomes (POs)
1. PO1: Basic and Discipline specific knowledge: Be able to
apply engineering knowledge of computing appropriate
to the problem
2. PO4: Engineering Tools, Experimentation and Testing:
Be able to use and apply current technical concepts and
best practices in information technologies
E. Practical Outcome(PRo)
Use image tags to create web page as per given sample.
The <img> tag is empty; it contains attributes only, and does not have a
closing tag.
7 | Page
Static Webpage Design (4311603)
8 | Page
Static Webpage Design (4311603)
Signature of Faculty
9 | Page
Static Webpage Design (4311603)
Practical No.4: Use HTML table tags to create web page as per given
sample.
A. Objective:
To create table in a webpage.
B. Expected Program Outcomes (POs)
1. PO1: Basic and Discipline specific knowledge: Be able to
apply engineering knowledge of computing appropriate
to the problem
2. PO4: Engineering Tools, Experimentation and Testing:
Be able to use and apply current technical concepts and
best practices in information technologies
E. Practical Outcome(PRo)
Use table tags to create web page as per given sample.
Table Cells
Each table cell is defined by a <td> and a </td> tag.
td stands for table data.
10 | Page
Static Webpage Design (4311603)
Table Rows
Each table row starts with a <tr> and end with
a </tr> tag.
tr stands for table row.
Table Headers
Sometimes you want your cells to be headers, in those
cases use the <th> tag instead of the <td> tag:
EXAMPLE:
<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border: 1px solid black;
border-radius: 10px;
}
th, td {
background-color: #96D4D4;
}
</style>
</head>
<body>
11 | Page
Static Webpage Design (4311603)
dotted
dashed
solid
double
groove
ridge
inset
outset
none
hidden
12 | Page
Static Webpage Design (4311603)
1. HTML & CSS – The Complete Reference, Thomas A. Powell, McGraw Hill
2. https://www.w3schools.com/html/
Signature of Faculty
13 | Page
Static Webpage Design (4311603)
Practical No.5: Use sorted (ordered) list to create web page as per given sample page.
A. Objective:
To apply ordered list in a webpage.
B. Expected Program Outcomes (POs)
1. PO1: Basic and Discipline specific knowledge: Be able to
apply engineering knowledge of computing appropriate
to the problem
2. PO3: . Design/ development of solutions: Design
solutions for engineering well-defined technical problems
and assist with the design of systems components or
processes to meet specified needs.
E. Practical Outcome(PRo)
Use ordered list to create web page as per given sample.
An ordered list starts with the <ol> tag. Each list item
starts with the <li> tag.
14 | Page
Static Webpage Design (4311603)
15 | Page
Static Webpage Design (4311603)
1. HTML & CSS – The Complete Reference, Thomas A. Powell, McGraw Hill
2. https://www.w3schools.com/html/
Signature of Faculty
16 | Page
Static Webpage Design (4311603)
Practical No.6: Use unsorted (unordered) list to create web page as per given sample page.
A. Objective:
To apply unordered list in a webpage.
B. Expected Program Outcomes (POs)
1. PO1: Basic and Discipline specific knowledge: Be able to
apply engineering knowledge of computing appropriate
to the problem
2. PO3: . Design/ development of solutions: Design
solutions for engineering well-defined technical problems
and assist with the design of systems components or
processes to meet specified needs.
E. Practical Outcome(PRo)
Use unordered list to create web page as per given sample.
An unordered list starts with the <ul> tag. Each list item
starts with the <li> tag.
17 | Page
Static Webpage Design (4311603)
18 | Page
Static Webpage Design (4311603)
1. HTML & CSS – The Complete Reference, Thomas A. Powell, McGraw Hill
2. https://www.w3schools.com/html/
Signature of Faculty
19 | Page
Static Webpage Design (4311603)
E. Practical Outcome(PRo)
Use definition list to create web page as per given sample.
20 | Page
Static Webpage Design (4311603)
21 | Page
Static Webpage Design (4311603)
Signature of Faculty
22 | Page
Static Webpage Design (4311603)
A. Objective:
To apply semantic tags to organize the web page contents.
B. Expected Program Outcomes (POs)
1. Basic and Discipline specific knowledge: Be able to apply engineering
knowledge of computing appropriate to the problem
2. Design/ development of solutions: Be able to design, implement, and
evaluate a computer based system, process, component, or program to
meet the desired needs
3. Engineering practices for society, sustainability and environment: Apply
appropriate technology in context of society, sustainability, environment
and ethical practices.
4. Life-long learning: Ability to analyse individual needs and engage in
updating in the context of technological changes.
E. Practical Outcome(PRo)
Use semantic tags to organize web page contents as per given sample.
G. Prerequisite Theory:
A semantic element clearly describes its meaning to both the browser and the developer.
Examples of non-semantic elements: <div> and <span> - Tells nothing about its content.
23 | Page
Static Webpage Design (4311603)
Examples of semantic elements: <form>, <table>, and <article> - Clearly defines its content.
Many web sites contain HTML code like: <div id="nav"> <div class="header"> <div id="footer">
to indicate navigation, header, and footer.
In HTML there are some semantic elements that can be used to define different parts of a web
page:
<article>
<aside>
<details>
<figcaption>
<figure>
<footer>
<header>
<main>
<mark>
<nav>
<section>
<summary>
<time>
<section>
<h1>GP Rajkot</h1>
<p>Best polytechnic college in Saurashtra region.</p>
</section>
24 | Page
Static Webpage Design (4311603)
<header>
<nav>
<section> <aside>
<article>
<footer>
25 | Page
Static Webpage Design (4311603)
26 | Page
Static Webpage Design (4311603)
Signature of Faculty
27 | Page
Static Webpage Design (4311603)
Practical No.9:
a. Create a student registration webpage using different HTML form elements.
b. Create student feedback form using different HTML form elements.
A. Objective:
To apply different form elements for designing interactive HTML web page .
B. Expected Program Outcomes (POs)
1. Basic and Discipline specific knowledge: Be able to apply engineering
knowledge of computing appropriate to the problem
2. Design/ development of solutions: Be able to design, implement, and
evaluate a computer based system, process, component, or program to
meet the desired needs
3. Engineering practices for society, sustainability and environment: Apply
appropriate technology in context of society, sustainability, environment
and ethical practices.
4. Life-long learning: Ability to analyse individual needs and engage in
updating in the context of technological changes.
E. Practical Outcome(PRo)
a. Create a student registration webpage using different HTML form elements.
b. Create student feedback form using different HTML form elements.
G. Prerequisite Theory:
The HTML <form> Elements
The HTML <form> element can contain one or more of the following form elements:
28 | Page
Static Webpage Design (4311603)
<input>
<label>
<select>
<textarea>
<button>
<fieldset>
<legend>
<datalist>
<output>
<option>
<optgroup>
Example:
<form action="/action_page.html">
</form>
Output:
29 | Page
Static Webpage Design (4311603)
The <label> element is useful for screen-reader users, because the screen-reader will read out loud
the label when the user focus on the input element.
The <label> element also help users who have difficulty clicking on very small regions (such as radio
buttons or checkboxes) - because when the user clicks the text within the <label> element, it toggles
the radio button/checkbox.
The for attribute of the <label> tag should be equal to the id attribute of the <input> element to bind
them together.
Example:
<form action="/action_page.html">
Output:
30 | Page
Static Webpage Design (4311603)
Example:
<option value="fiat" selected>Fiat</option>
<form action="/action_page.html">
31 | Page
Static Webpage Design (4311603)
The rows attribute specifies the visible number of lines in a text area.
32 | Page
Static Webpage Design (4311603)
Example:
<form action="/action_page.html">
<fieldset>
<legend>Personalia:</legend>
<label for="fname">First name:</label><br>
<input type="text" id="fname" name="fname" value="John"><br>
<label for="lname">Last name:</label><br>
<input type="text" id="lname" name="lname" value="Doe"><br><br>
<input type="submit" value="Submit">
</fieldset>
</form>
The <datalist> element specifies a list of pre-defined options for an <input> element.
Users will see a drop-down list of the pre-defined options as they input data.
The list attribute of the <input> element, must refer to the id attribute of the <datalist> element.
Example:
<form action="/action_page.html">
<input list="browsers">
<datalist id="browsers">
<option value="Internet Explorer">
<option value="Firefox">
<option value="Chrome">
<option value="Opera">
33 | Page
Static Webpage Design (4311603)
<option value="Safari">
</datalist>
</form>
Output:
<form action="/action_page.html"
oninput="x.value=parseInt(a.value)+parseInt(b.value)">
0
<input type="range" id="a" name="a" value="50">
100 +
<input type="number" id="b" name="b" value="50">
=
<output name="x" for="a b"></output>
<br><br>
<input type="submit">
</form>
34 | Page
Static Webpage Design (4311603)
Output
1. Decide and list fields to be kept in the registration and feed back form. Eg.
Name, Email , Mobile No Etc.
2. Decide which form element will you keep for field.
3. Design student registration web page.
4. Design student feed back web page.
5. Observe the output and do the necessary corrections.
35 | Page
Static Webpage Design (4311603)
36 | Page
Static Webpage Design (4311603)
Signature of Faculty
37 | Page
Static Webpage Design (4311603)
Practical No.10:
Create a bank account opening form using different HTML form elements in
Kompozer.
A. Objective:
To apply different form elements for designing interactive bank account opening
web page using kompozer open source tool .
B. Expected Program Outcomes (POs)
7. Life-long learning: Ability to analyze individual needs and engage in updating in the
context of technological changes in field of engineering.
38 | Page
Static Webpage Design (4311603)
E. Practical Outcome(PRo)
Create a bank account opening form using different HTML form elements in Kompozer.
G. Prerequisite Theory:
The HTML <form> Elements
The HTML <form> element can contain one or more of the following form elements:
<input>
<label>
<select>
<textarea>
<button>
<fieldset>
<legend>
<datalist>
<output>
<option>
<optgroup>
Example:
<form action="/action_page.html">
</form>
39 | Page
Static Webpage Design (4311603)
Output:
The <label> element is useful for screen-reader users, because the screen-reader will read out loud
the label when the user focus on the input element.
The <label> element also help users who have difficulty clicking on very small regions (such as radio
buttons or checkboxes) - because when the user clicks the text within the <label> element, it toggles
the radio button/checkbox.
The for attribute of the <label> tag should be equal to the id attribute of the <input> element to bind
them together.
Example:
<form action="/action_page.html">
40 | Page
Static Webpage Design (4311603)
Output:
Example:
<option value="fiat" selected>Fiat</option>
<form action="/action_page.html">
41 | Page
Static Webpage Design (4311603)
</form>
Output:
The rows attribute specifies the visible number of lines in a text area.
42 | Page
Static Webpage Design (4311603)
Example:
<form action="/action_page.html">
<fieldset>
<legend>Personalia:</legend>
<label for="fname">First name:</label><br>
<input type="text" id="fname" name="fname" value="John"><br>
<label for="lname">Last name:</label><br>
<input type="text" id="lname" name="lname" value="Doe"><br><br>
<input type="submit" value="Submit">
</fieldset>
</form>
43 | Page
Static Webpage Design (4311603)
The <datalist> element specifies a list of pre-defined options for an <input> element.
Users will see a drop-down list of the pre-defined options as they input data.
The list attribute of the <input> element, must refer to the id attribute of the <datalist> element.
Example:
<form action="/action_page.html">
<input list="browsers">
<datalist id="browsers">
<option value="Internet Explorer">
<option value="Firefox">
<option value="Chrome">
<option value="Opera">
<option value="Safari">
</datalist>
</form>
Output:
44 | Page
Static Webpage Design (4311603)
<form action="/action_page.html"
oninput="x.value=parseInt(a.value)+parseInt(b.value)">
0
<input type="range" id="a" name="a" value="50">
100 +
<input type="number" id="b" name="b" value="50">
=
<output name="x" for="a b"></output>
<br><br>
<input type="submit">
</form>
Output
Downoad KompoZer (use version 0.7.10, not 0.8), free software available at
http://kompozer.net/
45 | Page
Static Webpage Design (4311603)
Advantages of KompoZer
WYSIWYG editing of pages, making web creation as easy as typing a letter with your word
processor.
Integrated file management via FTP. Simply login to your web site and navigate through your
files, editing web pages on the fly, directly from your site.
Reliable HTML code creation that will work with all of today’s most popular browsers.
Jump between WYSIWYG Editing Mode and HTML using tabs.
Tabbed editing to make working on multiple pages a snap.
Powerful support for forms, tables, and templates.
The easiest-to-use, most powerful Web Authoring System available for Desktop Linux, Microsoft
Windows and Apple Macintosh users.
46 | Page
Static Webpage Design (4311603)
47 | Page
Static Webpage Design (4311603)
1. Decide and list fields to be kept in bank account opening form. Eg. Name,
Email , Mobile No Etc.
2. Decide which form element will you keep for field.
3. Design bank account opening form using kompozer.
4. Observe the output and do the necessary corrections.
48 | Page
Static Webpage Design (4311603)
49 | Page
Static Webpage Design (4311603)
Signature of Faculty
50 | Page
Static Webpage Design (4311603)
Practical No.11:
Use inline, internal and external style sheets for the student registration form and
bank account form created in previous practical.
A. Objective:
To create and apply inline. Internal and external style sheets in the student registration
form and the bank account opening registration form.
7. Life-long learning: Ability to analyze individual needs and engage in updating in the
context of technological changes in field of engineering.
E. Practical Outcome(PRo)
Use inline, internal and external style sheets for the student registration form and bank
account form created in previous practical.
F. Expected Affective domain Outcome(ADos)
1. Handle computer systems carefully with safety and necessary precaution
51 | Page
Static Webpage Design (4311603)
G. Prerequisite Theory:
What is CSS?
CSS Syntax
Inline CSS
An inline style may be used to apply a unique style for a single element.
To use inline styles, add the style attribute to the relevant element. The style attribute can contain any
CSS property.
Inline styles are defined within the "style" attribute of the relevant element:
Example:
<!DOCTYPE html>
52 | Page
Static Webpage Design (4311603)
<html>
<body>
</body>
</html>
Browser Output:
Internal CSS
An internal style sheet may be used if one single HTML page has a unique style.
The internal style is defined inside the <style> element, inside the head section.
Internal styles are defined within the <style> element, inside the <head> section of an HTML page:
Example:
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-color: linen;
}
h1 {
color: maroon;
margin-left: 40px;
}
</style>
</head>
<body>
53 | Page
Static Webpage Design (4311603)
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Browser Output:
External CSS
With an external style sheet, you can change the look of an entire website by changing just one file!
Each HTML page must include a reference to the external style sheet file inside the <link> element, inside
the head section.
Example:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="mystyle.css">
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
An external style sheet can be written in any text editor, and must be saved with a .css extension. The
external .css file should not contain any HTML tags.
54 | Page
Static Webpage Design (4311603)
"mystyle.css"
body {
background-color: lightblue;
}
h1 {
color: navy;
margin-left: 20px;
}
Browser Output:
55 | Page
Static Webpage Design (4311603)
Signature of Faculty
56 | Page
Static Webpage Design (4311603)
Practical No.12:
a. Use different CSS elements to create and format your Profile Page (Note: use CSS Background,
Text, Font, Tables, Links, Images, Margin etc)
b. Create and format your class time table Page Using Different CSS Elements (Note: use CSS
Background, Text, Font, Tables, Links, Images, Margin etc)
A. Objective:
a. To create the profile page and, create CSS elements and apply it on the profile
page.
b. To create the class time table page and, create CSS elements and apply it on the
page.
7. Life-long learning: Ability to analyze individual needs and engage in updating in the
context of technological changes in field of engineering.
E. Practical Outcome(PRo)
57 | Page
Static Webpage Design (4311603)
Use different CSS elements to create and format your Profile Page.
Create and format your class time table Page Using Different CSS Elements.
G. Prerequisite Theory:
What is CSS?
CSS Syntax
58 | Page
Static Webpage Design (4311603)
Inline CSS
An inline style may be used to apply a unique style for a single element.
To use inline styles, add the style attribute to the relevant element. The style attribute can contain any
CSS property.
Inline styles are defined within the "style" attribute of the relevant element:
Example:
<!DOCTYPE html>
<html>
<body>
</body>
</html>
Browser Output:
Internal CSS
An internal style sheet may be used if one single HTML page has a unique style.
The internal style is defined inside the <style> element, inside the head section.
Internal styles are defined within the <style> element, inside the <head> section of an HTML page:
Example:
<!DOCTYPE html>
<html>
<head>
59 | Page
Static Webpage Design (4311603)
<style>
body {
background-color: linen;
}
h1 {
color: maroon;
margin-left: 40px;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Browser Output:
External CSS
With an external style sheet, you can change the look of an entire website by changing just one file!
Each HTML page must include a reference to the external style sheet file inside the <link> element, inside
the head section.
Example:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="mystyle.css">
</head>
<body>
<h1>This is a heading</h1>
60 | Page
Static Webpage Design (4311603)
<p>This is a paragraph.</p>
</body>
</html>
An external style sheet can be written in any text editor, and must be saved with a .css extension. The
external .css file should not contain any HTML tags.
"mystyle.css"
body {
background-color: lightblue;
}
h1 {
color: navy;
margin-left: 20px;
}
Browser Output:
<html>
<head>
<link rel="stylesheet" href="pract12.css">
</head>
<body>
<h1> Hello World of H1 </h1>
<h2> Hello World of H2 </h2>
<table>
<tr><th> Table Title 1</th> <th> Table Title 2</th></tr>
61 | Page
Static Webpage Design (4311603)
“pract12.css”
html {
overflow-x: hidden; }
body {
font-family: 'Open Sans', sans-serif;
font-weight: 300;
color: #000;
background-color: #f4ede5; }
.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
font-family: 'Josefin Sans', sans-serif;
font-weight: 400; color:green;}
h1, h2 {
font-weight: 700; }
table, th, td {
border: 3px solid black;
color: blue;
text-align: center;
}
Browser Output:
62 | Page
Static Webpage Design (4311603)
63 | Page
Static Webpage Design (4311603)
64 | Page
Static Webpage Design (4311603)
Signature of Faculty
65 | Page
Static Webpage Design (4311603)
Practical No.13:
Use JavaScript to perform the following operations:
a. find roots of quadratic equation
b. find the highest from given three values
A. Objective:
a. To create java script that finds roots of quadratic equation
b. To create java script that finds the highest from given three values
7. Life-long learning: Ability to analyze individual needs and engage in updating in the
context of technological changes in field of engineering.
E. Practical Outcome(PRo)
Use JavaScript to perform the following operations: a. find roots of quadratic equation b.
find the highest from given three values
66 | Page
Static Webpage Design (4311603)
G. Prerequisite Theory:
This program computes roots of a quadratic equation when its coefficients are known.
ax2 + bx + c = 0, where
a≠0
The term b2-4ac is known as the discriminant of a quadratic equation. It tells the nature of the
roots.
If the discriminant is greater than 0, the roots are real and different.
If the discriminant is less than 0, the roots are complex and different.
67 | Page
Static Webpage Design (4311603)
In this example, x, y, and z, are variables, declared with the var keyword:
Example
var x = 5;
var y = 6;
var z = x + y;
Identifiers can be short names (like x and y) or more descriptive names (age, sum, totalVolume).
The general rules for constructing names for variables (unique identifiers) are:
68 | Page
Static Webpage Design (4311603)
Signature of Faculty
69 | Page
Static Webpage Design (4311603)
Practical No.14:
Use JavaScript to check whether given character is vowel or consonant using if else ladder.
A. Objective:
7. Life-long learning: Ability to analyze individual needs and engage in updating in the
context of technological changes in field of engineering.
E. Practical Outcome(PRo)
Use JavaScript to check whether given character is
vowel or consonant using if else ladder.
70 | Page
Static Webpage Design (4311603)
G. Prerequisite Theory:
Very often when you write code, you want to perform different actions for different
decisions. You can use conditional statements in your code to do this.
Syntax
if (condition1) {
// block of code to be executed if condition1 is true
} else if (condition2) {
// block of code to be executed if the condition1 is false and condition2 is true
} else {
// block of code to be executed if the condition1 is false and condition2 is false
}
Example
If time is less than 10:00, create a "Good morning" greeting, if not, but time is less than
20:00, create a "Good day" greeting, otherwise a "Good evening"
if (time < 10) {
greeting = "Good morning";
} else if (time < 20) {
greeting = "Good day";
} else {
greeting = "Good evening";
}
In alphabet from a to z, there are five vowels e.g. ‘a’, ‘e’, ‘i’, ‘o’, ‘u’
All other alphabet other than vowels are considered as Consonants.
71 | Page
Static Webpage Design (4311603)
Start computer system and Open your HTML code editor Kompozer.
72 | Page
Static Webpage Design (4311603)
Signature of Faculty
73 | Page
Static Webpage Design (4311603)
A. Objective:
To demonstrate usage of Switch case in JavaScript.
B. Expected Program Outcomes (POs)
1. Basic and Discipline specific knowledge: Be able to apply engineering
knowledge of computing appropriate to the problem
2. Design/ development of solutions: Be able to design, implement, and
evaluate a computer based system, process, component, or program to
meet the desired needs
3. Engineering Tools, Experimentation and Testing: Be able to use and apply
current technical concepts and best practices in information technologies.
4. Life-long learning: Ability to analyze individual needs and engage in
updating in the context of technological changes in field of engineering.
E. Practical Outcome(PRo)
Use JavaScript to check whether given character is vowel or consonant using switch case.
G. Prerequisite Theory:
74 | Page
Static Webpage Design (4311603)
break;
case y:
// code block
break;
default:
// code block
}
This is how it works:
75 | Page
Static Webpage Design (4311603)
Signature of Faculty
76 | Page
Static Webpage Design (4311603)
A. Objective:
To demonstrate usage of for loop in JavaScript.
B. Expected Program Outcomes (POs)
1. Basic and Discipline specific knowledge: Be able to apply engineering
knowledge of computing appropriate to the problem
2. Design/ development of solutions: Be able to design, implement, and
evaluate a computer based system, process, component, or program to
meet the desired needs
3. Engineering Tools, Experimentation and Testing: Be able to use and apply
current technical concepts and best practices in information technologies.
4. Life-long learning: Ability to analyze individual needs and engage in
updating in the context of technological changes in field of engineering.
E. Practical Outcome(PRo)
Use JavaScript to print first 10 even numbers.
G. Prerequisite Theory:
Loops can execute a block of code several times.
The For Loop
For statement creates a loop with 3 optional expressions:
77 | Page
Static Webpage Design (4311603)
Syntax:
for (expression 1; expression 2; expression 3)
{
// code block to be executed
}
Expression 1 is executed (one time) before the execution of the code block.
Expression 2 defines the condition for executing the code block.
Expression 3 is executed (every time) after the code block has been
executed.
78 | Page
Static Webpage Design (4311603)
Signature of Faculty
79 | Page
Static Webpage Design (4311603)
A. Objective:
To demonstrate usage of function in JavaScript.
B. Expected Program Outcomes (POs)
1. Basic and Discipline specific knowledge: Be able to apply engineering
knowledge of computing appropriate to the problem
2. Design/ development of solutions: Be able to design, implement, and
evaluate a computer based system, process, component, or program to
meet the desired needs
3. Engineering Tools, Experimentation and Testing: Be able to use and apply
current technical concepts and best practices in information technologies.
4. Life-long learning: Ability to analyze individual needs and engage in
updating in the context of technological changes in field of engineering.
E. Practical Outcome(PRo)
Use JavaScript to calculate power of given number.
G. Prerequisite Theory:
Function names can contain letters, digits, underscores, and dollar signs (same
rules as variables).
80 | Page
Static Webpage Design (4311603)
Function parameters are listed inside the parentheses () in the function definition.
Function arguments are the values received by the function when it is invoked.
Inside the function, the arguments (the parameters) behave as local variables.
Function Invocation
The code inside the function will execute when "something" invokes (calls) the
function:
81 | Page
Static Webpage Design (4311603)
82 | Page
Static Webpage Design (4311603)
A. Objective:
To demonstrate usage of for loop in JavaScript.
B. Expected Program Outcomes (POs)
1. Basic and Discipline specific knowledge: Be able to apply engineering
knowledge of computing appropriate to the problem
2. Design/ development of solutions: Be able to design, implement, and
evaluate a computer based system, process, component, or program to
meet the desired needs
3. Engineering Tools, Experimentation and Testing: Be able to use and apply
current technical concepts and best practices in information technologies.
4. Life-long learning: Ability to analyze individual needs and engage in
updating in the context of technological changes in field of engineering.
E. Practical Outcome(PRo)
Use JavaScript to print multiplication table of given number.
G. Prerequisite Theory:
The 'for' loop is the most compact form of looping. It includes the following three
important parts −
The loop initialization where we initialize our counter to a starting value. The
initialization statement is executed before the loop begins.
The test statement which will test if a given condition is true or not. If the condition
is true, then the code given inside the loop will be executed, otherwise the control
will come out of the loop.
83 | Page
Static Webpage Design (4311603)
The iteration statement where you can increase or decrease your counter.
You can put all the three parts in a single line separated by semicolons.
Syntax
84 | Page
Static Webpage Design (4311603)
Signature of Faculty
85 | Page
Static Webpage Design (4311603)
Practical No.19: Use JavaScript user defined functions to perform the following operations:
a. to calculate sum of 1 to n
b. to check whether given number is prime or not.
A. Objective:
To demonstrate usage of user defined functions in JavaScript.
B. Expected Program Outcomes (POs)
1. Basic and Discipline specific knowledge: Be able to apply engineering
knowledge of computing appropriate to the problem
2. Design/ development of solutions: Be able to design, implement, and
evaluate a computer based system, process, component, or program to
meet the desired needs
3. Engineering Tools, Experimentation and Testing: Be able to use and apply
current technical concepts and best practices in information technologies.
4. Life-long learning: Ability to analyze individual needs and engage in
updating in the context of technological changes in field of engineering.
E. Practical Outcome(PRo)
Use JavaScript to create user defined functions for calculating sum of 1 to n numbers and
to check whether a given number is prime or not.
G. Prerequisite Theory:
An user-defined function saves us from rewriting the same code again and again and
helps us to make our application smaller.
86 | Page
Static Webpage Design (4311603)
JavaScript has so many built-in functions, besides that you can make your own as per
the need.
Syntax
Statement
87 | Page
Static Webpage Design (4311603)
88 | Page
Static Webpage Design (4311603)
(b)
Signature of Faculty
89 | Page
Static Webpage Design (4311603)
A. Objective:
To use the concepts of Event handling in JavaScript.
E. Practical Outcome(PRo)
Use JavaScript to take input of student name and address and display in a dialog box and
to change background color of webpage as selected by user from a list of colors given in
combo box .
G. Prerequisite Theory:
JavaScript's interaction with HTML is handled through events that occur when the user
or the browser manipulates a page.
When the page loads, it is called an event. When the user clicks a button, that click too is
an event. Other examples include events like pressing any key, closing a window, resizing
a window, etc.
Static Webpage Design (4311603)
Developers can use these events to execute JavaScript coded responses, which cause
buttons to close windows, messages to be displayed to users, data to be validated, and
virtually any other type of response imaginable.
Events are a part of the Document Object Model (DOM) Level 3 and every HTML element
contains a set of events which can trigger JavaScript Code.
onclick Event Type
This is the most frequently used event type which occurs when a user clicks the left
button of his mouse. You can put your validation, warning etc., against this event type.
onsubmit Event Type
onsubmit is an event that occurs when you try to submit a form. You can put your form
validation against this event type.
(a) To take input of student name and address and display in a dialog box
Static Webpage Design (4311603)
(b) To change background color of webpage as selected by user from a list of colors given in
combo box.
(b)
Static Webpage Design (4311603)
Signature of Faculty
Static Webpage Design (4311603)
A. Objective:
To demonstrate usage of user defined functions and event handling in JavaScript.
B. Expected Program Outcomes (POs)
1. Basic and Discipline specific knowledge: Be able to apply engineering
knowledge of computing appropriate to the problem
2. Design/ development of solutions: Be able to design, implement, and
evaluate a computer based system, process, component, or program to
meet the desired needs
3. Engineering Tools, Experimentation and Testing: Be able to use and apply
current technical concepts and best practices in information technologies.
4. Life-long learning: Ability to analyze individual needs and engage in
updating in the context of technological changes in field of engineering.
E. Practical Outcome(PRo)
Use JavaScript to create user defined functions for calculating sum of 1 to n numbers and
to check whether a given number is prime or not.
G. Prerequisite Theory:
An user-defined function saves us from rewriting the same code again and again and
helps us to make our application smaller.
Static Webpage Design (4311603)
JavaScript has so many built-in functions, besides that you can make your own as per
the need.
Syntax
Statement
JavaScript's interaction with HTML is handled through events that occur when the user or the
browser manipulates a page.
When the page loads, it is called an event. When the user clicks a button, that click too is an
event. Other examples include events like pressing any key, closing a window, resizing a
window, etc.
Developers can use these events to execute JavaScript coded responses, which cause buttons
to close windows, messages to be displayed to users, data to be validated, and virtually any
other type of response imaginable.
Events are a part of the Document Object Model (DOM) Level 3 and every HTML element
contains a set of events which can trigger JavaScript Code.
onclick Event Type
This is the most frequently used event type which occurs when a user clicks the left
button of his mouse. You can put your validation, warning etc., against this event type.
onsubmit Event Type
onsubmit is an event that occurs when you try to submit a form. You can put your form
validation against this event type.
(a) To calculate the factorial of a given number entered into a textbox. Display the result in
another textbox.
Static Webpage Design (4311603)
(b) To perform arithmetic operations on two numbers entered into textboxes. Use Radio
buttons to select arithmetic operations (Addition, Subtraction, Multiplication and
Division). Display the result in another textbox.
Static Webpage Design (4311603)
Static Webpage Design (4311603)
(b)
Signature of Faculty