Lab Manual (WDD)
Lab Manual (WDD)
Submitted By:
Roll No:
586403
Class:
BS (Computer Science)
Semester:
6th
Session:
2020 – 2024
Course Title:
Web Design And Development
What is HTML?
</body>
</html>
Output:
My First Heading
My first paragraph.
Example Explained
• The <!DOCTYPE html> declaration defines that this document is an HTML5 document
• The <html> element is the root element of an HTML page
• The <head> element contains meta information about the HTML page
• The <title> element specifies a title for the HTML page (which is shown in the browser's
title bar or in the page's tab)
• The <body> element defines the document's body, and is a container for all the visible
contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.
• The <h1> element defines a large heading
• The <p> element defines a paragraph.
CSS Introduction: -
CSS is the language we use to style a Web page.
What is CSS?
CSS Example
body { background-color:
lightblue;
} h1 { color:
white; text-
align: center;
} p { font-family:
verdana;font-size:
20px;
}
output:
JavaScript Introduction: -
The example below "finds" an HTML element (with id="demo"), and changes the
element content (innerHTML) to "Hello JavaScript":
Example
document.getElementById("demo").innerHTML = "Hello JavaScript";
<!DOCTYPE html>
<html>
<body>
</body>
</html>
Output:
Example
document.getElementById("demo").style.display = "none";
Example
document.getElementById("demo").style.fontSize = "35px";
<html>
<body>
<ul>
<li>some fruits
<ul>
<li>banana</li>
<li>apple</li>
<li>mango</li>
<li>kiwi</li>
</ul>
</li>
</ul>
<ul>
<li>some vagetables
<ul>
<li>onion</li>
<li>leak</li>
<li>carrot</li>
</ul>
</li>
</ul>
</body>
</html>
Write a html program to create frame: -
<!DOCTYPE html>
<html>
<body>
<frameset cols="*,*,*">
<frame src="frame1.html">
src="frame3.html">
</frameset>
</body>
</html>
Output:
<label for="sex">Sex:</label>
<label for="male">Male</label>
<option>Select an option</option>
<option value="nepal">Nepal</option>
<option value="usa">USA</option>
<option value="australia">Australia</option>
</select><br><br>
<label for="message">Message:</label><br>
<label for="newsletter">Subscribe?</label><br><br>
Output:
Write a javascript program to validate USER LOGIN page: -
<html>
<head>
</head>
<body>
<div class="login-page">
<div class="form">
autocomplete="off" />
<img src="https://cdn2.iconfinder.com/data/icons/basic-ui-interface-v-
2/32/hide-512.png"
onclick="show()" id="showimg">
<span id="vaild-pass"></span>
</form>
</div>
</div>
<script src="index.js"></script>
</body>
</html> script
<link
rel="stylesheet"
href="style.css">
<script src="index.js"></script>
Create resume using html and css.
html
<div id="header"></div>
<div class="left"></div>
<div class="stuff">
<br><br>
<h1>Resume</h1>
<h2>Emily</h2>
<hr />
<br>
<p class="head">Interests</p>
<ul>
<li>Drawing</li>
<li>Photography</li>
<li>Design</li>
<li>Programming</li>
<li>Computer Science</li>
</ul>
<p class="head">Skills</p>
<ul>
</ul>
<p class="head">Education</p>
<ul>
<a href="http://www.wiltonhighschool.org/pages/Wilton_High_School">
</a>
<!--Link-->
<a href="https://www.silvermineart.org/">
</a>
<li>Codeacademy</li>
</ul>
<p class="head">Experience</p>
<ul>
<li>Student Technology Intern for Wilton School District</li>
<li>Babysitter</li>
</ul>
<p class="head">Extracurriculars</p>
<ul>
<li>Recycling Club</li>
<li>Gardening Club</li>
<li>Book Club</li>
</ul>
</div>
<div class="right"></div>
id="name">Emily</h2></div> css
*{
auto;
/*body { min-width:
500px;
}*/
}
#header { height: 40px;
z-index: 1;
#title { margin-left:
3%;
100%; background-color:
relative;
.left {
background-color: #e0eeee;
inherit;
}
.stuff { display: inline-
margin-left: 55px;
1000px;
p,
li {
.head { font-size:
20px;
#name { font-family:
Sacramento;
decoration: none;
.left,
.right { display:
none;
margin-left: 10px;
} Ouput:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
#calculator { max-
#display { width:
margin-bottom: 10px;
5px;
button
{ width: 100%;
padding: 10px;
font-size: 16px;
cursor: pointer;
</style>
<title>Calculator</title>
</head>
<body>
<div id="calculator">
<div id="buttons">
<button onclick="appendToDisplay('7')">7</button>
<button onclick="appendToDisplay('8')">8</button>
<button onclick="appendToDisplay('9')">9</button>
<button onclick="appendToDisplay('/')">/</button>
<button onclick="appendToDisplay('4')">4</button>
<button onclick="appendToDisplay('5')">5</button>
<button onclick="appendToDisplay('6')">6</button>
<button onclick="appendToDisplay('')"></button>
<button onclick="appendToDisplay('1')">1</button>
<button onclick="appendToDisplay('2')">2</button>
<button onclick="appendToDisplay('3')">3</button>
<button onclick="appendToDisplay('-')">-</button>
<button onclick="calculate()">=</button>
<button onclick="appendToDisplay('+')">+</button>
</div>
</div>
}
function calculate() { const display =
document.getElementById('display');
try {
display.value = eval(display.value);
} catch (error)
{ display.value = 'Error';
</script>
</body>
</html>
Output:
Create a Login Form: -
Step 1) Add HTML:
Add an image inside a container and add inputs (with a matching label) for each field. Wrap a
<form> element around them to process the input.
Example:
<div class="imgcontainer">
</div>
<div class="container">
<label for="uname"><b>Username</b></label>
<label for="psw"><b>Password</b></label>
<button type="submit">Login</button>
<label>
</label>
</div>
</div></form>