Finallll
Finallll
Objective: Design static web pages (Homepage, Login, Registration, Catalogue, and Cart)
for an online bookstore using HTML.
Description:
Theory:-
An online bookstore website typically consists of several core pages that allow users to
browse, register, log in, and purchase books. The homepage of the online bookstore can be
designed with a layout consisting of three frames: the top frame, the left frame, and the
right frame. This three-frame layout offers easy navigation and a dynamic user experience.
Here’s a detailed explanation of the design and how each component functions:
1. Top Frame:
The top frame serves as the header for the website, and its purpose is to provide essential
navigation options for the user. This section typically includes:
• Logo: An image that represents the website or the brand, usually placed at the top left
of the page.
• Website Name: The name of the website, typically displayed next to the logo or
beneath it.
• Navigation Links: Links that allow users to navigate to different pages on the
website. These links can include:
o Homepage: Clicking this link will bring the user back to the homepage.
o Login Page: A link to the login page where users can enter their credentials to
access their account.
o Registration Page: A link to the registration page where new users can create
an account.
Date-Roll No:-Class:-
o Catalogue Page: A link to the catalog page where books are organized and
displayed for browsing. o Cart Page: A link to the shopping cart page where
users can view and manage the items they’ve selected to purchase.
Each of these links in the top frame provides easy access to critical sections of the website,
helping users navigate smoothly between different areas.
2. Left Frame:
The left frame is typically used for displaying additional navigation options related to
specific categories or features of the website. In the case of an online bookstore, the left
frame might include:
3. Right Frame:
The right frame is the content area where the main information is displayed. Initially, this
frame may contain a welcome message or an introduction to the website. As users click on
links in the left frame, the content in the right frame dynamically changes to match the
selected category or page. For example:
• Homepage Content: If the user clicks on the "Home" link in the top frame, the right
frame will display a welcome message and an overview of what the online bookstore
offers.
• Login Form: When the "Login" link is clicked, a login form will appear in the right
frame, prompting the user to enter their username and password.
• Registration Form: Similarly, when the "Registration" link is clicked, a registration
form will appear in the right frame.
• Catalogue Listings: If a user clicks on a category like "CSE Books" in the left frame,
the right frame will dynamically load a list of books related to that category, along
with information like book titles, authors, prices, and brief descriptions.
Date-Roll No:-Class:-
• Cart Page: If the user clicks on the "Cart" link in the top frame, the right frame will
show the user's shopping cart contents, including a list of books they’ve added to their
cart, along with the total price.
One of the key features of the three-frame design is the ability to dynamically load content
into the right frame based on user interactions with the left frame. This helps provide a
seamless experience for the user, as they can easily browse through different book
categories, view their cart, or log in without the need for page reloads. The content in the
right frame changes in real-time based on the user’s selection from the navigation links in the
left and top frames.
• User-Friendly Navigation: With links placed in both the top and left frames, users
can quickly access various sections of the website without the need to scroll or search
through long pages.
• Seamless Experience: The ability to load content dynamically into the right frame
allows users to explore different pages (e.g., book categories, login, registration, cart)
without refreshing the entire page.
• Clean and Organized: The three-frame layout ensures that content is organized and
visually separated, helping users focus on the specific area they are interested in (e.g.,
book categories, cart contents).
In summary, the static homepage with a three-frame layout provides a clean, organized
structure for an online bookstore. It offers users easy access to important sections of the
website and allows for smooth navigation between pages, improving the overall user
experience.
Algorithm
o The Left Frame will contain links to specific categories or book genres (e.g.,
CSE, Literature, Science).
o The Right Frame is used to load the content related to the links clicked from
the left frame. Initially, this will display a general description of the website.
2. Page Flow:
o Homepage: Displays the website logo, name, and navigation links.
o Login Page: A simple form for users to log in. o Registration Page: A
simple form for users to register an account. o Catalogue Page: Display
categories of books available. o Cart Page: Display items the user has
added to their cart.
o Right Frame Content: This frame dynamically loads content based on user
interactions with the navigation links from the left frame.
3. Interaction Flow:
o When the user clicks a link in the Left Frame, the Right Frame loads the
relevant page (for example, clicking "CSE" will load the CSE catalogue in the
right frame).
o The website should support links that load content dynamically into the right
frame without refreshing the entire page.
Program:-
Index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Online Bookstore</title>
<style> body { font-family: Arial,
sans-serif;
margin: 0; padding:
0;
}
/* Styling for the Top Frame (Logo and Website Name) */
.top-frame { background-
color: #333;
color: white;
padding: 15px;
text-align:
center;
}
.nav-links { list-style-
type: none;
padding: 0; margin:
0;
}
.nav-links li { background-
color: #444; margin:
5px; padding: 10px;
text-align: center;
}
.nav-links li a { color:
white; text-
decoration: none;
font-size: 18px;
}
<!-- Frameset Structure for Left, Right, and Top Frames -->
<frameset rows="150px, *">
<!-- Top Frame (Logo and Website Info) -->
<frame src="about.html" name="top-frame" noresize scrolling="no">
<!-- Horizontal Split: Left Frame for Navigation, Right Frame for Content --> <frameset
cols="200px, *">
<!-- Left Frame (Navigation) -->
<frame src="nav.html" name="left-frame" scrolling="yes">
<!-- In case the browser doesn't support frames, we display this message -->
<noframes>
<p>Your browser does not support frames. Please upgrade your browser.</p>
</noframes>
</html>
Home.html
<!DOCTYPE html>
<html lang="en">
<head>
Date-Roll No:-Class:-
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Homepage</title>
<style> body { font-family: Arial,
sans-serif; text-align: center;
padding: 20px;
} h2 { color:
#333;
} p { font-size:
18px;
}
</style>
</head>
<body>
</ul>
</body>
</html>
About.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>About Us</title>
<style> body { font-family: Arial,
sans-serif; background-color:
#f4f4f4; text-align: center;
} h2
{
color: #333;
}
.nav-links { list-style-
type: none;
padding: 0; margin:
0;
}
.nav-links td
{ background-color:
#444; margin: 5px;
padding: 10px; text-
align: center;
}
.nav-links td a { color:
white; text-
Date-Roll No:-Class:-
decoration: none;
font-size: 18px;
}
.nav-links td a:hover { background-
color: #666;
}
</style>
</head>
<body>
Nav.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Navigation</title>
<style> body { font-family: Arial,
sans-serif; background-color:
#f4f4f4;
}
.nav-links { list-style-
type: none;
padding: 0; margin:
0;
}
.nav-links li { background-
color: #444; margin:
5px; padding: 10px;
text-align: center;
}
.nav-links li a { color:
white; text-
decoration: none;
font-size: 18px;
}
.nav-links li a:hover { background-
color: #666;
Date-Roll No:-Class:-
}
</style>
</head>
<body>
<ul class="nav-links">
<li><a href="CSE.html" target="right-frame">CSE</a></li>
<li><a href="EC.html" target="right-frame">EC</a></li>
<li><a href="EEE.html" target="right-frame">EEE</a></li>
<li><a href="civil.html" target="right-frame">Civil</a></li>
</ul>
</body>
</html>
Output:-
Date-Roll No:-Class:-
Experiment 2:
Objective: Create a login page with fields for username and password using HTML. Add
basic layout using CSS.
Algorithm :-
oIn the head, set the character encoding (meta tag) and add a title for the
page.
o Link an external CSS file (for styling) in the head.
2. Create a Container for the Form:
o Inside the body, create a div container with a class (e.g., login-container) to
hold the login form.
o This container will help center the form and apply styles uniformly.
3. Create the Form:
o Inside the container, create a form element with fields for username and
password.
o Use input elements to create the text fields:
▪ One input for username (type="text").
▪ One input for password (type="password").
o Add a button element for the login action.
Use label tags for accessibility and to describe each form element.
o
4. CSS Layout:
o Body Styling: Set a background color and use Flexbox to center the login-
container on the page (both vertically and horizontally). o Login
Container Styling: Give the container some padding, border-radius, and a
slight shadow for aesthetics. o Form Field Styling: Ensure the input
fields are appropriately sized with padding and borders.
o Button Styling: Style the button with color, padding, and a hover effect.
o Ensure the layout is responsive and looks good on various screen sizes.
5. Form Submission:
o Optionally, include JavaScript to handle form submission logic (e.g., check if
username and password are provided, show error messages).
Program:-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login Page</title>
<style> body { font-family:
Arial, sans-serif; margin:
20px;
Date-Roll No:-Class:-
background-color: #f9f9f9;
}</style>
</head>
<body>
<div align="center">
<h1>Login Page</h1>
<form action="/login" method="POST">
<label for="username">Username:</label><br>
<input type="text" id="username" name="username" required><br><br>
<label for="password">Password:</label><br>
<input type="password" id="password" name="password" required><br><br>
<button type="submit">Login</button>
<button type="reset">Login</button>
</form>
</div>
</body>
</html>
Output:-
Date-Roll No:-Class:-
Experiment 3:
Objective: CATOLOGUE PAGE: The catalogue page should contain the details of all the books available
in the web site in a table. The details should contain the following:
1. Snap shot of Cover Page.
2. Author Name.
3. Publisher.
4. Price.
5. Add to cart button
1. Start
2. Create Catalogue Page Structure:
o Initialize the HTML page with the required structure (e.g., <html>, <body>).
3. Display Catalogue Title:
o Display a heading or title at the top of the page, e.g., "Book Catalogue".
4. Create Table/Container for Book Details:
o Create a table or a grid layout to display the books.
o The table should have columns such as:
▪ Cover Page (Snapshot)
▪ Author Name
▪ Publisher
▪ Price
▪ Add to Cart Button
5. Loop through Available Books:
o Retrieve the list of books from the database or any data source (e.g., an array
of book objects).
o For each book, display the following details:
▪ Cover Page (Snapshot): Display an image or thumbnail of the book’s
cover.
▪ Author Name: Display the name of the book’s author. ▪ Publisher:
Display the publisher’s name. ▪ Price: Display the price of the book.
▪ Add to Cart Button: Provide a button labeled "Add to Cart" for the
user to add the book to their cart.
6. Handle Add to Cart Action:
o When a user clicks the "Add to Cart" button: ▪ Capture
the book’s details (e.g., book ID, name, price, etc.).
▪ Add the selected book to the user’s cart (e.g., store it in session or local
storage).
▪ Optionally, update the cart icon to show the number of items in the
cart.
7. Display Pagination (Optional):
o If the catalogue contains a large number of books, display pagination controls
(e.g., "Next", "Previous", page numbers) to allow users to navigate between
pages of books.
8. Filter and Sort Options (Optional):
o Provide filter options for users to narrow down their search (e.g., by author,
publisher, genre, etc.).
Date-Roll No:-Class:-
Program:-
.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
<title>Book Catalogue</title>
<style> body { font-family: Arial,
sans-serif; margin: 20px;
background-color: #f9f9f9;
}
table { width: 100%;
border-collapse:
collapse;
margin-top: 20px;
}
th, td { padding: 10px;
text-align: center;
border: 1px solid #ddd;
}
th { background-color:
#f2f2f2;
} img { max-width:
100px; height: auto;
border-radius: 5px;
}
.add-to-cart { background-
color: #28a745;
color: white;
border: none;
padding: 8px
15px; border-
radius: 4px;
cursor: pointer;
font-size: 14px;
}
.add-to-cart:hover { background-
color: #218838;
}
</style>
</head>
<body>
Date-Roll No:-Class:-
<h1>Book Catalogue</h1>
<table>
<thead>
<tr>
<th>Cover Page</th>
<th>Author Name</th>
<th>Publisher</th>
<th>Price</th>
<th>Add to Cart</th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="cover1.jpg" alt="Book Cover 1"></td>
<td>Book :XML Bible Author : Winston</td>
<td>Publication : Wiely</td>
<td>$10.99</td>
<td><button class="add-to-cart">Add to Cart</button></td>
</tr>
<tr>
<td><img src="cover2.jpg" alt="Book Cover 2"></td>
<td>Book :AI Author: S. Russel</td>
<td>Publication : Princeton hall</td>
<td>$15.99</td>
<td><button class="add-to-cart">Add to Cart</button></td>
</tr>
<tr>
<td><img src="cover3.jpg" alt="Book Cover 3"></td>
<td>Book : Java 2 Author : Watson</td>
<td>Publication : BPB</td>
<td>$20.99</td>
<td><button class="add-to-cart">Add to Cart</button></td>
</tr>
</tbody>
</table>
</body>
</html>
Output:-
Date-Roll No:-Class:-
Date-Roll No:-Class:-
Experiment 4:
Algorithm:-
Program:-
Date-Roll No:-Class:-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
<title>Book Catalogue</title>
<style> body { font-family: Arial,
sans-serif; margin: 20px;
background-color: #f9f9f9;
} table { width: 100%;
border-collapse: collapse;
margin-top: 20px;
} th, td { padding:
10px; text-align:
center;
border: 1px solid #ddd;
} th
{
background-color: #f2f2f2;
} img { max-width:
100px; height: auto;
border-radius: 5px;
}
.add-to-cart { background-
color: #28a745; color:
white; border: none;
padding: 8px 15px; border-
radius: 4px; cursor:
pointer; font-size: 14px; }
.add-to-cart:hover { background-
color: #218838;
}
</style>
</head>
<body>
<h1>Book Catalogue</h1>
<table>
<thead>
<tr>
<th>Cover Page</th>
<th>Author Name</th>
<th>Publisher</th>
<th>Price</th>
<th>Add to Cart</th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="cover1.jpg" alt="Book Cover 1"></td>
<td>Book :XML Bible Author : Winston</td>
<td>Publication : Wiely</td>
<td>$10.99</td>
<td><button class="add-to-cart">Add to Cart</button></td>
Date-Roll No:-Class:-
</tr>
<tr>
<td><img src="cover2.jpg" alt="Book Cover 2"></td>
<td>Book :AI Author: S. Russel</td>
<td>Publication : Princeton hall</td>
<td>$15.99</td>
<td><button class="add-to-cart">Add to Cart</button></td>
</tr>
<tr>
<td><img src="cover3.jpg" alt="Book Cover 3"></td>
<td>Book : Java 2 Author : Watson</td>
<td>Publication : BPB</td>
<td>$20.99</td>
<td><button class="add-to-cart">Add to Cart</button></td>
</tr>
</tbody>
</table>
</body>
</html>
Output:-
Date-Roll No:-Class:-
Experiment 5:
Objective :-REGISTRATION PAGE:
Create a “registration form “with the following fields
1) Name (Text field)
2) Password (password field)
3) E-mail id (text field)
4) Phone number (text field)
5) Sex (radio button)
6) Date of birth (3 select boxes)
7) Languages known (check boxes – English, Telugu, Hindi, Tamil) 8) Address (text area)
Program:-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Registration Form</title>
<style> body { font-family: Arial,
sans-serif; background-color:
#f4f4f9; margin: 0;
padding: 20px;
}
h2 { text-align:
center; color:
#333;
Date-Roll No:-Class:-
table { width:
100%;
margin-bottom: 20px;
}
td { padding:
10px; text-
align: left;
}
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
textarea,
select {
width: 100%; padding:
8px; margin: 5px 0;
border: 1px solid
#ccc; border-radius:
4px;
}
textarea {
resize: vertical;
}
input[type="radio"],
input[type="checkbox"] {
margin-right: 5px;
}
.button-container { text-
align: center;
}
input[type="submit"] {
background-color:
#4CAF50; color: white;
padding: 10px 20px; border:
none; border-radius: 4px;
cursor: pointer;
}
Date-Roll No:-Class:-
input[type="submit"]:hover {
background-color: #45a049;
}
</style>
</head>
<body>
<h2>Registration Form</h2>
<div class="button-container">
Date-Roll No:-Class:-
</body>
</html>
Output:-
Date-Roll No:-Class:-
Experiment 6
Objective:
JS VALIDATION: Write JavaScript to validate the following fields of the above registration
page.
1. Name (Name should contains alphabets and the length should not be less than 6
characters).
Theory: -
JavaScript form validation is crucial for ensuring that user input is correct before submission,
preventing incorrect data from reaching the server. In this case, validating fields such as
Name, Password, Email, and Phone Number ensures that each input adheres to specified
rules. For example, the Name field should only contain alphabets and be at least six
characters long, while the Password should have a minimum length of six characters to
ensure security. The Email must follow a standard pattern (e.g., [email protected]), and the
Phone Number must contain exactly 10 digits. These validations can be performed using
JavaScript’s built-in functions like test() and regular expressions, providing immediate
feedback to the user and enhancing the user experience by catching errors before submission.
By using JavaScript validation, we ensure data integrity and improve the efficiency of the
registration process.
Algorithm
1. Validate Name:
o Check if the name contains only alphabetic characters.
o Ensure the name is at least 6 characters long.
2. Validate Password:
Date-Roll No:-Class:-
Program
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Registration Form</title>
<style>
padding: 20px;
}
form {
background-color: #fff;
padding: 20px; border-radius: 8px; box-
max-width: 400px;
margin: auto;
width: 100%;
radius: 4px;
}
button {
background-color:
}
button:hover {
background-color: #45a049;
}
.error {
color: red;
font-size: 12px;
</style>
</head>
<body>
<h2>Registration Form</h2>
<label for="name">Name:</label>
<label for="password">Password:</label>
Date-Roll No:-Class:-
<label for="email">Email:</label>
<button type="submit">Submit</button>
</form>
<script>
function validateForm()
// Validate Name
const nameError =
document.getElementById('nameError'); const
namePattern = /^[A-Za-z]+$/;
valid = false;
} else {
nameError.textContent = "";
// Validate Password
passwordError = document.getElementById('passwordError'); if
} else {
passwordError.textContent = "";
// Validate Email
%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/; if (!emailPattern.test(email)) {
} else {
emailError.textContent = "";
const phoneError =
document.getElementById('phoneError'); const
phonePattern = /^[0-9]{10}$/;
if (!phonePattern.test(phone)) {
Date-Roll No:-Class:-
valid = false;
} else {
phoneError.textContent = "";
}
return valid; // Return false to prevent form submission if invalid
</script>
</body>
</html>
Output:-
Date-Roll No:-Class:-
Figure 1
Experiment No:-7
Objective: CSS: Design a web page using CSS(Cascading Style Sheets) which includes the
following:
1) Use different font, styles:
In the style definition you define how each selector should work(font, color etc.). Then, in the
body of your pages, you refer to these selectors to activate the styles. 2) Set a background
image for both the page and single elements on the page.
Theory: -
Date-Roll No:-Class:-
CSS (Cascading Style Sheets) is a stylesheet language used to define the look and feel of web
pages. It allows developers to create reusable style definitions for fonts, colors, and layouts
by assigning specific properties to selectors such as body, h1, or .class-name. These styles
can be applied globally or to individual elements to achieve a consistent and visually
appealing design. Additionally, CSS enables the use of background images for both the entire
page and individual elements, allowing for creative customization with properties like
background-image, background-size, and background-position.
Algorithm: -
1. HTML Tags: o Create the basic HTML structure with tags like <html>, <head>,
and <body>. o Inside the <head>, include the meta tags for character set and
viewport settings.
o Include the page title inside the <title> tag.
o Create a <style> tag in the <head> section to add the internal CSS.
2. Create Page Sections:
o In the <body>, add the following sections:
▪ Header Section: A header with a main heading <h1> and a paragraph
<p>.
▪ Main Content Section: A section with a subheading <h2> and a
paragraph <p>.
▪ Highlighted Section: A section that draws attention with another
background image.
▪ Footer Section: A footer with some copyright text.
o Set a background color for the footer section. o Change the font and
text color in the footer. o Center align the text inside the footer.
o Set padding for spacing.
1. Link States:
o Define styles for links using a:link, a:visited, a:hover, and a:active pseudo-
classes.
o Change the color, text-decoration, and hover effects (e.g., underline links on
hover).
Program
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Stylish Web Page</title>
text-align: center;
color: white; /* White text for contrast */
}
/* Highlighted Section */
.highlight { background-image: url('highlight-bg.jpg'); /* Different background
image for this
section */
background-size: cover; /* Ensure the image covers the section */
background-position: top; /* Align the image to the top */
padding: 50px;
color: white; /* White text for contrast */
text-align: center; /* Center-align the text */
margin: 20px;
border-radius: 10px; /* Optional rounded corners */
}
/* Footer Section */
footer {
background-color: #333; /* Dark background for footer */
color: white; /* White text color for footer */
text-align: /* Center-align footer text */
center; padding:
20px; position:
relative; bottom:
0;
width: 100%;
Date-Roll No:-Class:-
/* Link Styling */
a:link, a:visited {
color: #3498db; /* Blue color for links */ text-decoration: none;
/* Remove underline from links */
}
a:hover {
color: #1abc9c; /* Green color when the link is hovered */ text-decoration: underline;
/* Underline on hover */
}
a:active {
color: #e74c3c; /* Red color when the link is clicked */
}
.main-content, .highlight {
padding: 20px; /* Reduce padding for small screens */
}
footer {
padding: 10px; /* Reduce footer padding */
}
}
</style>
</head>
<body>
</body>
</html>
Output:-
Experiment 8
Objective: CSS: Design a web page using CSS(Cascading Style Sheets) which includes the
following:
1) Control the repetition of the image with the background-repeat property.
2) Define styles for links as
A:link
A:visited
A:active
A:hover
Theory:-
To design a web page using CSS that meets the given requirements, we can implement styles
for background images and links in the following manner:
Date-Roll No:-Class:-
Algorithm:
2. Create the HTML structure:
o Add a basic structure with a header, main content, and links.
o Use the <style> tag in the <head> section to include internal CSS styles.
3. Control the background image repetition:
o Use the background-repeat property in CSS to control how the image repeats
(e.g., no-repeat, repeat-x, or repeat-y).
4. Define link styles using pseudo-classes:
o Use the pseudo-classes a:link, a:visited, a:active, and a:hover to style links for
different states.
5. Save and test the page:
o Save the file as .html and open it in a web browser to verify the results.
Program:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
margin: 0;
padding: 0;
/* Header styles */
header { text-
align: center;
padding: 20px;
color: white;
/* Link styles */
a:link {
a:visited {
}
Date-Roll No:-Class:-
a:hover {
a:active {
*/ main { padding:
ul {
padding: 0;
}
li {
margin: 10px 0;
</style>
</head>
<body>
<header>
</header>
<main>
Date-Roll No:-Class:-
<ul>
</ul>
</main>
</body>
</html>
Output:-
Date-Roll No:-Class:-
Objective:
Develop a static web page on a chosen topic integrating HTML, CSS, and JavaScript.
Topics:
1. Personal Portfolio
2. To-Do List
3. Survey Form
4. Tribute Page
5. Questionnaire
Project(Personal Portfolio)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Personal Portfolio</title>
<style>
/* General reset for margin and padding */
* { margin:
0;
padding:
0;
box-sizing: border-box;
}
/* Header styles */
header {
background-color: #333;
color: white; padding:
20px 0; text-align:
center; }
header h1 {
font-size: 2.5em;
Date-Roll No:-Class:-
margin-bottom: 10px;
}
header p {
font-size: 1.2em;
margin-bottom: 20px;
}
header nav ul li
{ display: inline;
margin-right:
20px;
}
header nav ul li a
{ color: white; text-
decoration: none;
font-size: 1.1em;
}
/* Section styles */
section {
padding: 60px 0; text-
align: center;
}
section h2 {
font-size: 2em;
margin-bottom:
20px; color: #333;
}
/* About section */
#about { background-
color: #fff; color:
#333;
}
#about p { font-
size: 1.1em;
margin: 20px 0;
}
/* Projects section */
#projects { background-color:
#f9f9f9;
}
Date-Roll No:-Class:-
.project-card h3 { margin-
bottom: 10px;
}
.project-card p { font-
size: 1em;
margin-bottom: 15px;
}
.project-card a { text-
decoration: none;
color: #333; font-
weight: bold;
}
/* Contact section */
#contact { background-
color: #fff; color:
#333;
}
#contact p { font-
size: 1.2em;
margin-bottom: 10px;
}
#contact a { text-
decoration: none;
color: #007bff; font-
weight: bold;
}
/* Footer styles */
footer { background-color:
#333;
color: white; padding:
10px 0; text-align:
center;
}
footer p { font-
size: 1em;
}
Date-Roll No:-Class:-
header p { font-
size: 1em;
}
.project-card
{ width: 100%;
}
}
</style>
</head>
<body>
<!-- Header Section -->
<header>
<h1>Dia Dwivedi </h1>
<p>Web Developer</p>
<nav>
<ul>
<li><a href="#about">About</a></li>
<li><a href="#projects">Projects</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
</header>
<p>A full-stack web application built using React for the front-end and Node.js for
the back-end. It allows users to manage their tasks and to-dos.</p>
<a href="#">View Project</a>
</div>
</section>
Output
Date-Roll No:-Class:-
Date-Roll No:-Class:-