CS1507 Internet Programming Laboratory LTPC Objectives
CS1507 Internet Programming Laboratory LTPC Objectives
CS1507 Internet Programming Laboratory LTPC Objectives
CO1 3 3 3 3 2 - - - - 2 2 2 3 3 2
CO2 3 3 3 3 2 - - - - 2 2 2 3 3 2
CO3 3 3 3 3 2 - - - - 2 2 2 3 3 2
Ex.No 1 : To create an html page with different types of frames such as floating frame,
navigation frame& mixed frame
Aim: Create an HTML page with different types of frames, including a floating frame,
navigation frame, and mixed frame.
Procedure/Algorithm:
Coding Example
index.html
<!DOCTYPE html>
<html>
<head>
<title>Frame Example</title>
</head>
</frameset>
</frameset>
</html>
floating.html:
<!DOCTYPE html>
<html>
<head>
<title>Floating Frame</title>
<style>
body {
margin: 0;
padding: 0;
background-color: lightblue;
}
h1 {
text-align: center;
margin-top: 50px;
}
</style>
</head>
<body>
<h1>Floating Frame Content</h1>
</body>
</html>
navigation.html:
<!DOCTYPE html>
<html>
<head>
<title>Navigation Frame</title>
<style>
body {
margin: 0;
padding: 0;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
}
li {
padding: 10px;
background-color: #f2f2f2;
border-bottom: 1px solid #ccc;
}
li:hover {
background-color: #e6e6e6;
}
a{
text-decoration: none;
color: #333;
}
</style>
</head>
<body>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Products</a></li>
<li><a href="#">Contact</a></li>
</ul>
</body>
</html>
content.html:
<!DOCTYPE html>
<html>
<head>
<title>Content Frame</title>
<style>
body {
margin: 0;
padding: 20px;
}
.hotspot {
position: relative;
display: inline-block;
}
.hotspot img {
width: 100%;
height: auto;
}
.hotspot .overlay {
position: absolute;
top: 10px;
left: 10px;
background-color: rgba(255, 255, 255, 0.7);
opacity: 0;
transition: opacity 0.3s ease;
padding: 10px;
color: #333;
}
.hotspot:hover .overlay {
opacity: 1;
}
</style>
</head>
<body>
<h1>Welcome to the Content Frame</h1>
<div class="hotspot">
<img src="india.jpg" alt="India Map" usemap="#hotspot-map">
<div class="overlay">
<p>This is a hotspot!</p>
</div>
</div>
<p>India is a federal union comprising 28 states and 8 union territories, with a total of 36
entities. The states and union territories are further subdivided into districts and smaller
administrative divisions..</p>
<map name="hotspot-map">
<area shape="rect" coords="50,50,200,200" href="https://www.tamilnadu.com"
alt="Hotspot Link">
<area shape="circle" coords="300,150,50" href="https://www.kerala.com" alt="Hotspot
Link">
<area shape="poly" coords="400,100,450,200,350,200" href="https://www.andra.com"
alt="Hotspot Link">
</map>
</body>
</html>
Output :
Result :
Successfully created all frames and various hotspot
Ex.No : 2 Develop static pages (using only HTML) of an online Book store. The pages
should resemble: www.amazon.com the website should consist the following pages. Home
page, Registration and user Login, User profile page, Books catalog, Shopping cart, Payment
By credit card, order confirmation
Procedure:
1. Identify the different pages required for the online bookstore: Home page,
Registration and User Login, User Profile page, Books Catalog, Shopping Cart,
Payment by Credit Card, and Order Confirmation.
2. Create a new directory for your project and navigate into it using a command line
interface.
3. Use a text editor or an Integrated Development Environment (IDE) to create HTML
files for each page.
4. Start with the Home page:
Write the HTML structure, including the <!DOCTYPE html> declaration,
<html> tags, <head> section, and <body> section.
Add the necessary elements for the Home page, such as a header, navigation
menu, featured books, and footer.
Style the page using CSS to achieve the desired layout and visual appearance.
5. Repeat the process for the remaining pages:
Registration and User Login: Create a form for user registration and login.
User Profile page: Display user information and allow users to edit their profile.
Books Catalog: Create a grid or list view to display books with their details.
Shopping Cart: Show the selected books, allow users to modify quantities or
remove items.
Payment by Credit Card: Create a form for users to enter their credit card details.
Order Confirmation: Display a confirmation message after a successful order.
6. Link the pages together using hyperlinks and navigation menus.
7. Test the pages by opening them in a web browser to ensure they render correctly.
8. Optionally, you can enhance the pages further by adding images, additional
interactivity, or improving the layout and design.
Home.html
<!DOCTYPE html>
<html>
<head>
<title>Online Bookstore</title>
<style>
/* CSS styles for the page */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
header {
background-color: #f8f8f8;
padding: 10px;
text-align: center;
}
nav {
background-color: #333;
color: #fff;
padding: 10px;
}
nav ul {
list-style-type: none;
margin: 0;
padding: 0;
}
nav ul li {
display: inline-block;
margin-right: 10px;
}
nav ul li a {
color: #fff;
text-decoration: none;
}
.featured-books {
text-align: center;
padding: 20px;
}
footer {
background-color: #f8f8f8;
padding: 10px;
text-align: center;
}
</style>
</head>
<body>
<header>
<h1>Welcome to the Online Bookstore</h1>
</header>
<nav>
<ul>
<li><a href="home.html">Home</a></li>
<li><a href="login.html">Login</a></li>
<li><a href="register.html">Register</a></li>
<li><a href="profile.html">Profile</a></li>
<li><a href="catalog.html">Books Catalog</a></li>
<li><a href="cart.html">Shopping Cart</a></li>
<li><a href="payment.html">Payment</a></li>
<li><a href="confirmation.html">Order Confirmation</a></li>
</ul>
</nav>
<div class="featured-books">
<h2>Featured Books</h2>
<p>Here are some of our top picks:</p>
<ul>
<li>Book 1</li>
<li>Book 2</li>
<li>Book 3</li>
</ul>
</div>
<footer>
<p>© 2023 Online Bookstore. All rights reserved.</p>
</footer>
</body>
</html>
Login.html
<!DOCTYPE html>
<html>
<head>
<title>User Login</title>
<style>
/* CSS styles for the page */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
.container {
max-width: 400px;
margin: 0 auto;
padding: 20px;
}
h2 {
text-align: center;
}
form {
margin-top: 20px;
}
form label {
display: block;
margin-bottom: 5px;
}
form input[type="text"],
form input[type="password"],
form input[type="submit"] {
width: 100%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 4px;
}
form input[type="submit"] {
background-color: #333;
color: #fff;
cursor: pointer;
}
form input[type="submit"]:hover {
background-color: #555;
}
.message {
text-align: center;
margin-top: 10px;
}
</style>
</head>
<body>
<div class="container">
<h2>User Login</h2>
<form>
<label for="email">Email:</label>
<input type="text" id="email" name="email" placeholder="Enter your email" required>
<label for="password">Password:</label>
<input type="password" id="password" name="password" placeholder="Enter your
password" required>
<div class="message">
<p>Don't have an account? <a href="register.html">Register</a></p>
</div>
</div>
</body>
</html>
register.html
<!DOCTYPE html>
<html>
<head>
<title>Registration</title>
<style>
/* CSS styles for the page */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
.container {
max-width: 400px;
margin: 0 auto;
padding: 20px;
}
h2 {
text-align: center;
}
form {
margin-top: 20px;
}
form label {
display: block;
margin-bottom: 5px;
}
form input[type="text"],
form input[type="password"],
form input[type="submit"] {
width: 100%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 4px;
}
form input[type="submit"] {
background-color: #333;
color: #fff;
cursor: pointer;
}
form input[type="submit"]:hover {
background-color: #555;
}
.message {
text-align: center;
margin-top: 10px;
}
</style>
</head>
<body>
<div class="container">
<h2>Registration</h2>
<form>
<label for="name">Name:</label>
<input type="text" id="name" name="name" placeholder="Enter your name" required>
<label for="email">Email:</label>
<label for="password">Password:</label>
<input type="password" id="password" name="password" placeholder="Enter your
password" required>
<div class="message">
<p>Already have an account? <a href="login.html">Login</a></p>
</div>
</div>
</body>
</html>
profile.html
<!DOCTYPE html>
<html>
<head>
<title>User Profile</title>
<style>
/* CSS styles for the page */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
.container {
max-width: 400px;
margin: 0 auto;
padding: 20px;
}
h2 {
text-align: center;
}
.profile-info {
margin-top: 20px;
}
.profile-info label {
display: block;
margin-bottom: 5px;
}
.profile-info span {
font-weight: bold;
}
.message {
text-align: center;
margin-top: 10px;
}
</style>
</head>
<body>
<div class="container">
<h2>User Profile</h2>
<div class="profile-info">
<label>Name:</label>
<span>John Doe</span>
<label>Email:</label>
<span>johndoe@example.com</span>
<label>Address:</label>
<span>123 Main St, City, Country</span>
</div>
<div class="message">
<p><a href="edit-profile.html">Edit Profile</a></p>
</div>
</div>
</body>
</html>
catlog.html
<!DOCTYPE html>
<html>
<head>
<title>Books Catalog</title>
<style>
/* CSS styles for the page */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
h2 {
text-align: center;
}
.book-list {
margin-top: 20px;
}
.book {
display: flex;
margin-bottom: 20px;
border: 1px solid #ccc;
border-radius: 4px;
padding: 10px;
}
.book img {
max-width: 100px;
margin-right: 10px;
}
.book-info {
flex: 1;
}
.book-info h3 {
margin: 0;
}
.book-info p {
margin: 5px 0;
}
</style>
</head>
<body>
<div class="container">
<h2>Books Catalog</h2>
<div class="book-list">
<div class="book">
<img src="book1.jpg" alt="Book 1">
<div class="book-info">
<h3>Book Title 1</h3>
<p>Author: Author Name 1</p>
<p>Price: $19.99</p>
<p>Description: Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div>
</div>
<div class="book">
<img src="book2.jpg" alt="Book 2">
<div class="book-info">
<h3>Book Title 2</h3>
<p>Author: Author Name 2</p>
<p>Price: $24.99</p>
<p>Description: Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div>
</div>
<!-- Add more book entries as needed -->
</div>
</div>
</body>
</html>
Cart.html
<!DOCTYPE html>
<html>
<head>
<title>Shopping Cart</title>
<style>
/* CSS styles for the page */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
h2 {
text-align: center;
}
.cart-items {
margin-top: 20px;
}
.item {
display: flex;
margin-bottom: 20px;
border: 1px solid #ccc;
border-radius: 4px;
padding: 10px;
}
.item img {
max-width: 100px;
margin-right: 10px;
}
.item-info {
flex: 1;
}
.item-info h3 {
margin: 0;
}
.item-info p {
margin: 5px 0;
}
.subtotal {
text-align: right;
margin-top: 20px;
}
</style>
</head>
<body>
<div class="container">
<h2>Shopping Cart</h2>
<div class="cart-items">
<div class="item">
<img src="book1.jpg" alt="Book 1">
<div class="item-info">
<h3>Book Title 1</h3>
<p>Author: Author Name 1</p>
<p>Price: $19.99</p>
<p>Quantity: 1</p>
</div>
</div>
<div class="item">
<div class="subtotal">
<p>Subtotal: $69.97</p>
</div>
<div>
<button>Checkout</button>
</div>
</div>
</body>
</html>
payment.html
<!DOCTYPE html>
<html>
<head>
<title>Payment</title>
<style>
/* CSS styles for the page */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
.container {
max-width: 400px;
margin: 0 auto;
padding: 20px;
}
h2 {
text-align: center;
}
form {
margin-top: 20px;
}
form label {
display: block;
margin-bottom: 5px;
}
form input[type="text"],
form input[type="number"],
form input[type="submit"] {
width: 100%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 4px;
}
form input[type="submit"] {
background-color: #333;
color: #fff;
cursor: pointer;
}
form input[type="submit"]:hover {
background-color: #555;
}
</style>
</head>
<body>
<div class="container">
<h2>Payment</h2>
<form>
<label for="card-number">Card Number:</label>
<input type="text" id="card-number" name="card-number" placeholder="Enter your card
number" required>
<label for="cvv">CVV:</label>
<input type="number" id="cvv" name="cvv" placeholder="Enter the CVV" required>
confirmation.html
<!DOCTYPE html>
<html>
<head>
<title>Order Confirmation</title>
<style>
/* CSS styles for the page */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
.container {
max-width: 400px;
margin: 0 auto;
padding: 20px;
}
h2 {
text-align: center;
}
.order-details {
margin-top: 20px;
}
.order-details label {
display: block;
margin-bottom: 5px;
}
.order-details span {
font-weight: bold;
}
.message {
text-align: center;
margin-top: 10px;
}
</style>
</head>
<body>
<div class="container">
<h2>Order Confirmation</h2>
<div class="order-details">
<label>Order Number:</label>
<span>123456789</span>
<label>Items:</label>
<span>Book Title 1, Book Title 2</span>
<label>Total Amount:</label>
<span>$69.97</span>
</div>
<div class="message">
<p>Thank you for your order!</p>
</div>
</div>
</body>
</html>
Result :