Professional Documents
Culture Documents
20BCE2904 - Lab Assignment 2
20BCE2904 - Lab Assignment 2
Engineering
CSE3002-Internet and Web Programming
Fall 2022-23
Slot: - L19 + L20
Lab Assignment 2
HTML and CSS
Submitted By:
BIJAN SHRESTHA
B.Tech Computer Science and Engineering
Reg No. : 20BCE2904
SUBMITTED TO:
PROF. Dr. Rajkumar R
Asst. Prof. Grade 2
School of Computer Science and Engineering
VIT University
Vellore-14, INDIA
Output:
Code:
Output:
Code:
Output:
Output:
</form>
</body>
</html>
Output:
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Registration Form
</title>
<style>
body {
background-color: rgb(4, 102, 248);
font-family: Verdana;
text-align: center;
}
form {
background-color: #fff;
max-width: 500px;
border-radius: 50px;
margin: 50px auto;
padding: 30px 20px;
box-shadow: 2px 5px 10px rgba(0, 0, 0, 0.5);
}
.form-control {
text-align: left;
margin-bottom: 25px;
}
/* Styling Button */
button {
background-color: lightblue;
border: 1px solid rgb(0, 217, 255);
border-radius: 5px;
font-family: inherit;
font-size: 25px;
display: block;
width: 100%;
margin-top: 50px;
margin-bottom: 30px;
}
</style>
</head>
<body>
<!-- Create Form -->
<form id="form">
<img src="logo.jpg" alt="no image" width="150" height="150">
<h1>VIT Registration Form</h1>
<div class="form-control">
<label for="name" id="label-name">
Name
</label>
<input type="text" id="name" placeholder="Enter your name" />
</div>
<div class="form-control">
<label for="email" id="label-email">
Email
</label>
<input type="email" id="email" placeholder="Enter your email" />
</div>
<div class="form-control">
<label>
Gender
</label>
<label for="recommed-1">
<input type="radio" id="recommed-1" name="recommed">Male</input>
</label>
<div class="form-control">
<label for="branch" id="label-branch">
Branch
</label>
<select name="branch" id="branch">
<option value="CSE">CSE</option>
<option value="IT">IT</option>
<option value="CIVIL">CIVIL</option>
<option value="other">Other</option>
</select>
</div>
<div class="form-control">
<label for="branch" id="label-branch">
<div class="form-control">
<input type="checkbox"name="inp"> I agree Rules and Regulations.
</div>
<div class="form-control">
<label for="comment">
Comments
</label>
<textarea width="40" height="50" name="comment" id="comment" placeholder="Enter
your comment here">
</textarea>
</div>
</html>
Output:
</body>
</html>
<marquee>Bijan Shrestha</marquee>
<strike>vit</strike>
<blink><h1>VIT</h1></blink>
</body>
</html>
Output:
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
body {
font-family: system-ui;
}
.labParagraph {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
}
.labParagraph h1,
.labParagraph h2 {
margin: 0;
}
.labParagraph p {
margin: 0;
}
h2 {
opacity: .5;
}
.labParagraph-inner {
display: inline-flex;
flex-direction: column;
gap: 16px;
min-width: 350px;
width: fit-content;
max-width: 100%;
}
.labParagraph-title {
width: fit-content;
}
min-width: 90%;
width: 0;
max-width: 90%;
text-align: justify;
}
.labParagraph-description-icon {
align-self: stretch;
display: flex;
align-items: center;
justify-content: center;
min-width: 96px;
}
.labParagraph-description path {
fill: #f8b807;
}
</style>
</head>
<body>
<div class="labParagraph">
<div class="labParagraph-inner">
<div class="labParagraph-title">
<h2>IWP lab</h2>
<h1>Paragraph</h1>
</div>
<div class="labParagraph-description">
<div class="labParagraph-description-icon">
</html>
Output:
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>web Page</title>
<style>
footer {
text-align: center;
padding: 3px;
background-color: rgb(12, 178, 243);
color: white;
text-decoration: none;
}
header {
text-align: center;
padding: 3px;
background-color: rgb(10, 245, 10);
color: rgb(240, 6, 6);
}
</style>
</head>
<body>
<header>
<h1>Header Tag</h1>
<p>Assignment</p>
<p>Hello I am Bijan</p>
</header>
<script>
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.fillStyle = "red";
ctx.fillRect(20, 20, 75, 50);
//Turn transparency on
ctx.globalAlpha = 0.2;
ctx.fillStyle = "blue";
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = "green";
ctx.fillRect(80, 80, 75, 50);
</script>
<footer>
<p>Author: Bijan Shrestha<br>
<a href="bijan.shrestha7170@gmail.com">GMAIL</a></p>
</footer>
</body>
</html>
Output:
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Registration Form
</title>
<style>
body {
background-color: rgb(4, 211, 248);
font-family: Verdana;
text-align: center;
}
form {
background-color: rgb(14, 125, 252);
max-width: 500px;
border-radius: 50px;
margin: 50px auto;
padding: 30px 20px;
box-shadow: 2px 5px 10px rgba(0, 0, 0, 0.5);
}
.form-control {
text-align: left;
margin-bottom: 25px;
}
/* Styling Button */
button {
background-color: lightblue;
border: 1px solid rgb(0, 217, 255);
border-radius: 5px;
font-family: inherit;
font-size: 25px;
display: block;
width: 100%;
margin-top: 50px;
margin-bottom: 30px;
}
</style>
</head>
<body>
<!-- Create Form -->
<form id="form">
<h1>VIT Form</h1>
<div class="form-control">
<label for="name" id="label-name">
Name
</label>
<input type="text" id="name" placeholder="Enter your name" required />
</div>
<div class="form-control">
<label for="email" id="label-email">
Email
</label>
<input type="email" id="email" placeholder="Enter your email" required />
</div>
<div class="form-control">
<label>
Gender
</label>
<label for="recommed-1">
<input type="radio" id="recommed-1" name="recommed"> Male
<input type="radio" id="recommed-2"name="recommed"> Female
<input type="radio" id="recommed-3" name="recommed"> Other</label>
<label for="recommed-2">
</html>
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>style list</title>
<style>
ul.a {
list-style-type: circle;
}
ul.b {
list-style-type: square;
}
ol.c {
list-style-type: upper-roman;
}
ol.d {
list-style-type: lower-alpha;
}
</style>
</head>
<body>
<h2>The list-style-type Property</h2>
<ul class="b">
<li>Bijan Shrestha</li>
<li>Anurag Karki</li>
<li>Pramit Karki</li>
</ul>
<ol class="d">
<li>Bijan Shrestha</li>
<li>Anurag Karki</li>
<li>Pramit Karki</li>
</ol>
</body>
</html>
Output:
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>corner style</title>
<style>
#rcorners1 {
border-radius: 25px;
background: #05e0e7;
padding: 20px;
width: 200px;
height: 150px;
}
#rcorners2 {
border-radius: 25px;
border: 2px solid #faaf0c;
padding: 20px;
width: 200px;
height: 150px;
}
#rcorners3 {
border-radius: 25px;
background: url(download.png);
background-position: left top;
background-repeat: repeat;
padding: 20px;
width: 200px;
height: 150px;
}
</style>
</head>
<body>
<h1>The border-radius Property</h1>
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>menu down</title>
<style>
.dropbtn {
background-color: #04AA6D;
color: white;
padding: 16px;
font-size: 16px;
border: none;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f1f1f1;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
<div class="dropdown">
<button class="dropbtn">Course Code</button>
<div class="dropdown-content">
<a href="#">CSE1001</a>
<a href="#">CSE1002</a>
<a href="#">CSE1003</a>
<a href="#">CSE1004</a>
<a href="#">CSE1005</a>
</div>
</div>
</body>
</html>
Output:
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Table and CSS</title>
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
tr:nth-child(even) {
background-color: rgba(150, 212, 212, 0.4);
}
th:nth-child(even),td:nth-child(even) {
background-color: rgba(150, 212, 212, 0.4);
}
</style>
</head>
<body>
<center>
<h2>Time Table</h2>
<p>VIT Class time table</p>
</center>
<table style="width:100%">
<tr>
<th>MON</th>
<th>TUE</th>
<th>WED</th>
<th>THU</th>
<th>FRI</th>
<th>SAT</th>
<th>SUN</th>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</body>
</html>
Output:
1) Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>prompt</title>
</head>
<body>
<script type="text/javascript">
var name = window.prompt("Enter your name: ");
alert("Your name is " + name);
</script>
</body>
</html>
Output:
Output:
3)Code:
<!DOCTYPE html>
<html>
<head>
<title>
HTML DOM Window status Property
</title>
<!-- Script to use window status property -->
<script type="text/javascript">
function UpdateStatusBar (over) {
if (over)
window.status = "The mouse is over the text.";
else
</body>
</html>
Alert
Code:
<html>
<head><title>My Page</title></head>
<body>
<p>
<a href="alert.html">Bijan Shrestha</a>
<br />
<a href="alert.html"
onMouseover="window.alert('Hello Bijan Shrestha');">
Bijan Shrestha</A>
</p>
</body>
</html>
Output:
Output:
Redirect
Code:
<html>
<head>
<script type="text/javascript">
function Redirect() {
window.location="http://www.vit.ac.in";
}
</script>
</head>
<body>
<form>
<input type="button" value="Redirect Me" onclick="Redirect();" />
</form>
</body>
</html>
Output:
Javascript string
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<title>JavaScript String toLowerCase() and toUpperCase() function</title>
</head>
<body>
<script type="text/javascript">
var str = "Hello Bijan Shrestha";
document.write(str.toUpperCase() + "<br />");
document.write(str.toLowerCase());
</script>
</body>
</html>
Output: