Experiment 1: Create a Static Web Page Using Table Tags of HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Table Example</title>
</head>
<body>
<h1>Student Information</h1>
<table border="1">
<tr>
<th>Roll No</th>
<th>Name</th>
<th>Class</th>
</tr>
<tr>
<td>101</td>
<td>John Doe</td>
<td>10th</td>
</tr>
<tr>
<td>102</td>
<td>Jane Smith</td>
<td>12th</td>
</tr>
</table>
</body>
</html>
Experiment 2: Create a Static Web Page Defining All Text Formatting Tags in Tabular Format
<!DOCTYPE html>
<html lang="en">
<head>
<title>Text Formatting</title>
</head>
<body>
<h1>HTML Text Formatting</h1>
<table border="1">
<tr>
<th>Tag</th>
<th>Example</th>
</tr>
<tr>
<td><b></td>
<td><b>Bold Text</b></td>
</tr>
<tr>
<td><i></td>
<td><i>Italic Text</i></td>
</tr>
<tr>
<td><u></td>
<td><u>Underlined Text</u></td>
</tr>
<tr>
<td><mark></td>
<td><mark>Highlighted Text</mark></td>
</tr>
</table>
</body>
</html>
Experiment 3: Create a Web Page Using LIST Tags of HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>HTML Lists</title>
</head>
<body>
<h1>Types of Lists</h1>
<h2>Unordered List</h2>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
<h2>Ordered List</h2>
<ol>
<li>Step 1</li>
<li>Step 2</li>
<li>Step 3</li>
</ol>
</body>
</html>
Experiment 4: Create Employee Registration Web Page Using HTML Form Objects
<!DOCTYPE html>
<html lang="en">
<head>
<title>Employee Registration</title>
</head>
<body>
<h1>Employee Registration Form</h1>
<form>
<label for="name">Name:</label>
<input type="text" id="name" name="name"><br><br>
<label for="email">Email:</label>
<input type="email" id="email" name="email"><br><br>
<label for="gender">Gender:</label>
<input type="radio" name="gender" value="Male"> Male
<input type="radio" name="gender" value="Female"> Female<br><br>
<label for="department">Department:</label>
<select id="department" name="department">
<option value="IT">IT</option>
<option value="HR">HR</option>
<option value="Finance">Finance</option>
</select><br><br>
<button type="submit">Submit</button>
</form>
</body>
</html>
Experiment 5: Apply Style Sheet in Web Page (Inline, Embedded, and Linked)
<!DOCTYPE html>
<html lang="en">
<head>
<title>Style Sheet Example</title>
<style>
h1 {
color: blue;
</style>
</head>
<body style="background-color: lightgrey;">
<h1>This is an Example</h1>
<p style="color: green;">This is styled using inline CSS.</p>
<link rel="stylesheet" href="styles.css">
</body>
</html>
Experiment 6: Create a Web Page Displaying 'Welcome to ASP' Using VBScript
<!DOCTYPE html>
<html>
<head>
<title>VBScript Example</title>
</head>
<body>
<script language="VBScript">
Document.Write("Welcome to ASP")
</script>
</body>
</html>
Experiment 7: Display a Paragraph in Red Color with the First Letter in Blue
<!DOCTYPE html>
<html lang="en">
<head>
<title>Paragraph Styling</title>
<style>
p{
color: red;
font-size: 16px;
p::first-letter {
font-size: 28px;
color: blue;
</style>
</head>
<body>
<p>This is an example paragraph.</p>
</body>
</html>
Experiment 8: Write a Java Program/Servlet/JSP to Connect to a Database
<%@ page import="java.sql.*" %>
<html>
<head>
<title>Database Connection</title>
</head>
<body>
<%
try {
Class.forName("com.mysql.cj.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/testdb", "root",
"password");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM employees");
while (rs.next()) {
out.println(rs.getInt("id") + " " + rs.getString("name") + "<br>");
} catch (Exception e) {
out.println("Error: " + e);
%>
</body>
</html>
Experiment 9: Write a Static Web Page for Shopping Cart
<!DOCTYPE html>
<html lang="en">
<head>
<title>Shopping Cart</title>
</head>
<body>
<h1>Shopping Cart</h1>
<table border="1">
<tr>
<th>Item</th>
<th>Quantity</th>
<th>Price</th>
</tr>
<tr>
<td>Item 1</td>
<td>2</td>
<td>$20</td>
</tr>
<tr>
<td>Item 2</td>
<td>1</td>
<td>$10</td>
</tr>
</table>
</body>
</html>
Experiment 10: Write a JSP to Create and Retrieve a Cookie
<%
// Create a Cookie
Cookie cookie = new Cookie("username", "JohnDoe");
response.addCookie(cookie);
%>
<html>
<head>
<title>Cookie Example</title>
</head>
<body>
<%
// Retrieve the Cookie
Cookie[] cookies = request.getCookies();
for (Cookie c : cookies) {
if (c.getName().equals("username")) {
out.println("Cookie Value: " + c.getValue());
%>
</body>
</html>