Web Design
Web Design
<html lang="en">
<head>
<meta charset="UTF-8">
h1 {
color: #333399;
p{
font-size: 18px;
color: #555555;
a{
decoration: none;
}
</style>
</head>
<body>
<h1>Welcome to My Webpage!</h1>
</body>
</html>
Output:
Welcome to My Webpage!
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Registration Form</title>
rgba(0,0,0,0.1);
td {
padding: 10px;
100%;
padding: 8px; border-
solid #ccc;
input[type="submit"] {
background-color: #4CAF50;
a{
text-decoration: none;
color: #007BFF;
</style>
</head>
<body>
<table>
<tr>
<td>Full Name:</td>
<td><input type="text" name="fullname" required></td>
</tr>
<tr>
<td>Email:</td>
</tr>
<tr>
<td>Password:</td>
</tr>
<tr>
<td>Confirm Password:</td>
</tr>
<tr>
<input type="submit
Output:
Full Name:
Email:
Password:
Confirm Password:
Experiment 3- Use user defined function to get array of values and sort them in
ascending order on webpage.
<!DOCTYPE html>
<html>
<head>
<title>Sort Array</title>
<style>
body {
color: #f4f4f4;
input, button {
padding: 8px;
margin: 5px;
#output { margin-
#333399;
</style>
</head>
<body>
<button onclick="sortArray()">Sort</button>
<div id="output"></div>
<script>
if (array.some(isNaN)) { document.getElementById("output").innerHTML =
"Please enter valid numbers separated by commas.";
return;
</script>
</body>
</html>
Output:
Sort
e.g; 3,6,1,5,2,9
Experiment 4- Design a dynamic web page with validation of form field using
Java Script.
<!DOCTYPE html>
<html>
<head>
.form-container {
background-color: white;
0 0 10px rgba(0,0,0,0.1);
h2 { text-align:
center;
width: 100%; padding: 10px; margin: 10px 0; border-radius: 5px; border: 1px solid
#ccc;
}
input[type="submit"] {
background-color: #28a745;
pointer;
.error { color:
red; font-size:
14px;
}
</style>
</head>
<body>
<div class="form-container">
<h2>User Registration</h2>
<label for="name">Name:</label>
<label for="email">Email:</label>
<label for="age">Age:</label>
</form>
</div>
document.getElementById("nameError").innerHTML = "";
document.getElementById("emailError").innerHTML = "";
document.getElementById("passwordError").innerHTML = "";
document.getElementById("ageError").innerHTML = "";
document.getElementById("age").value.trim();
let valid = true;
// Validate Name
= false;
// Validate Email
} else if (!/^\S+@\S+\.\S+$/.test(email)) {
= false;
6 characters";
valid = false;
// Validate Age
if (age === "" || isNaN(age) || age < 18) {
= false;
return valid;
</script>
</body>
</html>
Output-
User Registration
Name:
Email:
Password:
Age:
Experiment 5- Design a catalogue in ASP.
<%@ Language="VBScript" %>
<!DOCTYPE html>
<html>
<head>
<title>Product Catalogue</title>
collapse: collapse;
background-color: #fff;
th, td {
padding: 12px;
text-align: center;
th {
background-color: #333;
color: white;
}
h2 { text-align:
center;
</style>
</head>
<body>
<h2>Product Catalogue</h2>
<table>
<tr>
<th>Product ID</th>
<th>Name</th>
<th>Description</th>
<th>Price ($)</th>
</tr>
<%
' Create a sample array of products Dim products(3,3) products(0,0) = "101" : products(0,1) =
Dim i
For i = 0 To 3
Response.Write "<tr>"
Next
%>
</table>
</body>
</html>
Output:
Product Catalogue
<html>
<head>
<style>
body {
color: #f2f2f2;
radius: 5px;
}
.error { color: red;
bottom: 10px;
}
input[type="submit"] {
background-color: #4CAF50;
cursor: pointer;
input[type="submit"]:hover { background-
color: #45a049;
</style>
</head>
<body>
<div class="form-container">
<h2>Registration Form</h2>
<label>Name:</label>
<label>Email:</label>
<input type="email" id="email" oninput="validateEmail()">
<label>Password:</label>
<input type="password" id="password" onblur="validatePassword()">
</form>
</div>
false;
} else {
nameError.textContent = "";
return true;
return false;
} else {
emailError.textContent = "";
return true;
return false;
} else {
passwordError.textContent = "";
return true;
</script>
</body>
</html>
Output-
Registration Form
Name:
Email:
Password:
Register
Experiment 7- Open a Window from the current window on Mouse Over event.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
.hover-link {
color: blue;
text-decoration: underline;
cursor: pointer;
.hover-link:hover {
color: darkblue;
</style>
</head>
<body>
</p>
<p>
</p>
</script>
</body>
</html>
Output-