css mp
css mp
1. INTRODUCTION
JavaScript's versatility has made it a fundamental tool for web developers, and it is
widely used to add functionality such as:
1. Creating Dynamic Web Pages: JavaScript enables developers to create content that responds
in real-time. For example, with JavaScript, elements on a webpage can change instantly without
requiring a page reload, allowing for smooth transitions, animations, and other interactive
experiences.
2. Event Handling: JavaScript is adept at responding to user interactions, also known as events,
such as clicks, mouse movements, keystrokes, and more. This means that developers can
program specific actions to occur in response to user interactions, like showing or hiding
elements, updating information, or triggering animations, allowing for a more engaging
experience.
1
Dr D.Y.Patil Polytechnic
A Restaurant Website
3. COURSE OUTCOME
The theory, practical experiences and relevant soft skills associated with this course
are to be taught and implemented, so that the student demonstrates the following industry oriented COs
associated with the above mentioned competency:
4. LITERATURE REVIEW
a) https://www.w3schools.com
b) http://www.tutorialspoint.com
c) http://javapoint.com
2
Dr D.Y.Patil Polytechnic
A Restaurant Website
HTML Code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact Us</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="bg">
<div>
<img src="bg5.1.jpg" style="opacity: 0.3; width: 100%; position: fixed; margin:0px; display: flex;">
</div>
<div class="navbar">
<div class="logo">
<img src="logo2.png" alt="logo" style="height: 60px; padding-left: 18px;">
</div>
<div class="menu">
<button class="menu-btn"><a href="home.html" style="color: white; text-decoration:
none;">Home</a></button>
<button class="menu-btn"><a href="abt.html" style="color: white; text-decoration: none;">About
our food</a></button>
<button class="menu-btn"><a href="contactus.html" style="color: white ; text-decoration:
none;">Contact Us</a></button>
<button class="menu-btn"><a href="" style="color: white ; text-decoration: none;">Log
in</a></button>
</div>
</div>
</div>
<div>
<h1 class="title"><b>Contact Us</b></h1>
</div>
3
A Restaurant Website
<section class="contact">
<div class="container">
<div class="contactInfo">
<div class="box">
<div class="icon"><svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960
960 960" width="24px" fill="#000000"><path d="M480-480q33 0 56.5-23.5T560-560q0-33-23.5-56.5T480-
640q-33 0-56.5 23.5T400-560q0 33 23.5 56.5T480-480Zm0 294q122-112 181-203.5T720-552q0-109-69.5-
178.5T480-800q-101 0-170.5 69.5T240-552q0 71 59 162.5T480-186Zm0 106Q319-217 239.5-334.5T160-
552q0-150 96.5-239T480-880q127 0 223.5 89T800-552q0 100-79.5 217.5T480-80Zm0-480Z"/></svg></div>
<div class="text">
<h3>Address</h3>
<p>DYP, Kolhapur.</p>
</div>
</div>
<div class="box">
<div class="icon"><svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960
960 960" width="24px" fill="#000000"><path d="M760-480q0-117-81.5-198.5T480-760v-80q75 0 140.5
28.5t114 77q48.5 48.5 77 114T840-480h-80Zm-160 0q0-50-35-85t-85-35v-80q83 0 141.5 58.5T680-480h-
80Zm198 360q-125 0-247-54.5T329-329Q229-429 174.5-551T120-798q0-18 12-30t30-12h162q14 0 25
9.5t13 22.5l26 140q2 16-1 27t-11 19l-97 98q20 37 47.5 71.5T387-386q31 31 65 57.5t72 48.5l94-94q9-9 23.5-
13.5T670-390l138 28q14 4 23 14.5t9 23.5v162q0 18-12 30t-30 12ZM241-600l66-66-17-94h-89q5 41 14 81t26
79Zm358 358q39 17 79.5 27t81.5 13v-88l-94-19-67 67ZM241-600Zm358 358Z"/></svg></div>
<div class="text">
<h3>Phone</h3>
<a href="tel:79726067XX" style="text-decoration: none; color: white;">79726077XX</a>
</div>
</div>
<div class="box">
<div class="icon"><svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960
960 960" width="24px" fill="#000000"><path d="M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-
56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm320-280L160-
640v400h640v-400L480-440Zm0-80 320-200H160l320 200ZM160-640v-80 480-400Z"/></svg></div>
<div class="text">
<h3>Email</h3>
4
A Restaurant Website
5
A Restaurant Website
</html>
.title{
font-size: 60px;
text-align: center;
margin-bottom: 10px;
font-weight: bold;
border-radius: 20px;
margin-left: 250px;
margin-right: 250px;
opacity: 0.9;
.bg{
display: inline;
align-items: center;
justify-content: space-between;
.navbar{
opacity: 0.9;
width: 1500px;
display: flex;
height: 60px;
6
A Restaurant Website
justify-content: space-between;
align-items: center;
background-color: black;
border-bottom-left-radius: 12px;
border-bottom-right-radius: 12px;
.logo{
opacity: 0.9;
.menu{
display: flex;
gap: 25px;
opacity: 0.9;
.contactForm
width: 40%;
padding: 40px;
background: #fff;
border-radius: 12px;
.contactForm h2
font-size: 30px;
color: #333;
font-weight: 500px;
7
A Restaurant Website
.contactForm .inputBox
position: relative;
width: 100%;
margin-top: 10px;
width: 100%;
padding: 5px 0;
font-size: 16px;
margin: 10px 0;
border-top: none;
border-right: none;
border-left: none;
outline: none;
resize: none;
position: absolute;
left: 0;
pad: 5px 0;
8
A Restaurant Website
font-size: 16px;
margin: 10px 0;
pointer-events: none;
transition: 0.5s;
color: #66666647;
width: 100px;
background: black;
color: #fff;
cursor: pointer;
padding: 10px;
font-size: 18px;
border-radius: 12px;
.submit{
width: 100px;
background: black;
color: #fff;
cursor: pointer;
padding: 10px;
font-size: 18px;
border-radius: 12px;
.footer{
9
A Restaurant Website
background-color:black;
margin-top: 30px;
display: flex;
left: 60px;
font-size: 23px;
text-align: center;
justify-content: center;
border-top-left-radius: 12px;
border-top-right-radius: 12px;
.footer-info{
color: white;
font-size: 20px;
opacity: 0.9;
name.focus();
return;
}
if (email.value.trim() === "") {
alert("Please enter your email.");
email.focus();
return;
}
//Email validation
const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]
{2,4}$/;
if (!emailPattern.test(email.value)) {
alert("Please enter a valid email address.");
email.focus();
return;
}
if (message.value.trim() === "") {
alert("Please enter a message.");
message.focus();
return;
}
alert("Your message has been sent successfully!");
document.querySelector('form').reset();
}
// Add event listener to form
document.querySelector('form').addEventListener('submit', validateForm);
</script>
6. SYSTEM REQUIRMENTS
2 Software Notepad/Text 1
Editor -
3 - - -
Any other resource
used
12
A Restaurant Website
13
A Restaurant Website
14
A Restaurant Website
8. CONCLUSION
This micro project effectively combines user-friendly design with essential features such
as form validation, responsiveness, and interactivity. By using JavaScript, the form ensures that users can only
submit complete and correct information, which helps avoid errors and improves data quality. The page is fully
responsive, adapting seamlessly to different screen sizes, making it accessible on both mobile devices and
desktops. Additionally, features like smooth scrolling and real-time feedback enhance the user experience,
making it more engaging and intuitive.
With a focus on simplicity and functionality, the project also takes into account
accessibility, ensuring that all users can navigate the page easily, regardless of their device or abilities. By
implementing these key features, the "Contact Us" page offers a smooth, efficient, and pleasant experience for
visitors, encouraging them to get in touch. This project serves as a solid foundation for creating a professional
and user-friendly contact form, with room for future improvements and enhancements.
9. FUTERSCOPE
The micro project serves several practical purposes in the context of website development,
enhancing user interaction and communication between the website owner and visitors. Here are some key uses
for this project:
• Enabling User Communication
The primary use of this project is to provide a direct communication channel between
users and the website owner or business. It allows visitors to easily reach out for inquiries, support requests,
feedback, or any other form of communication, helping businesses and individuals stay connected with their
audience.
• Customer Support and Feedback Collection
By including a contact form, this project enables users to submit questions, concerns, or
suggestions. This feedback can be invaluable for businesses seeking to improve their products, services, or user
experience. The form validation ensures that all submitted data is complete and accurate, which is essential
for providing effective customer support.
• Lead Generation and Client Engagement
The Contact Us page can be a lead generation tool. Visitors who fill out the form with
their contact information may be potential leads for businesses. By collecting information like name, email,
and message, companies can follow up with interested parties to convert them into clients or customers.
15
A Restaurant Website
10. REFERENCE
a) https://www.w3schools.com
b) http://www.nptelvideos.com
c) http://www.tutorialspoint.com.
d) http://javapoint.com
16