Here’s a clean, responsive HTML and CSS implementation for your Terms and Conditions, Privacy Policy, and Refund Policy pages. The design is mobile-friendly and includes a consistent header/footer for branding.
HTML (policy.html)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Policies | [Restaurant Name]</title>
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
</head>
<body>
<!-- Header -->
<header>
<div class="logo">
<a href="index.html"><img src="logo.png" alt="[Restaurant Name]"></a>
</div>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="menu.html">Menu</a></li>
<li><a href="policy.html" class="active">Policies</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
</header>
<!-- Main Content -->
<main>
<div class="policy-container">
<!-- Tabs Navigation -->
<div class="policy-tabs">
<button class="tab-btn active" onclick="openPolicy('terms')">Terms & Conditions</button>
<button class="tab-btn" onclick="openPolicy('privacy')">Privacy Policy</button>
<button class="tab-btn" onclick="openPolicy('refund')">Refund Policy</button>
</div>
<!-- Policy Content -->
<div id="terms" class="policy-content active">
<h1>Terms and Conditions</h1>
<p><strong>Last Updated:</strong> [Insert Date]</p>
<h2>1. Acceptance of Terms</h2>
<p>By accessing or placing an order on [Restaurant Name], you agree to comply with these Terms and Conditions...</p>
<h2>2. Ordering Process</h2>
<p>Orders are subject to availability and confirmation via SMS/email...</p>
<!-- Add remaining sections from your Terms & Conditions -->
</div>
<div id="privacy" class="policy-content">
<h1>Privacy Policy</h1>
<p><strong>Last Updated:</strong> [Insert Date]</p>
<h2>1. Data Collection</h2>
<p>We collect personal information such as name, phone number, email, and order history...</p>
<!-- Add remaining sections from your Privacy Policy -->
</div>
<div id="refund" class="policy-content">
<h1>Refund Policy</h1>
<p><strong>Last Updated:</strong> [Insert Date]</p>
<h2>1. Eligibility for Refunds</h2>
<p>We issue refunds for canceled orders (before preparation), delivery delays, or wrong/damaged orders...</p>
<!-- Add remaining sections from your Refund Policy -->
</div>
</div>
</main>
<!-- Footer -->
<footer>
<div class="footer-content">
<div class="footer-logo">
<img src="logo.png" alt="[Restaurant Name]">
<p>Delivering happiness since [Year].</p>
</div>
<div class="footer-links">
<h3>Quick Links</h3>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="menu.html">Menu</a></li>
<li><a href="policy.html">Policies</a></li>
</ul>
</div>
<div class="footer-contact">
<h3>Contact Us</h3>
<p><i class="fas fa-phone"></i> +91-XXXXXXX</p>
<p><i class="fas fa-envelope"></i> your@email.com</p>
</div>
</div>
<div class="footer-bottom">
<p>© 2024 [Restaurant Name]. All rights reserved.</p>
</div>
</footer>
<!-- JavaScript for Tab Switching -->
<script>
function openPolicy(policyName) {
const contents = document.getElementsByClassName("policy-content");
for (let i = 0; i < contents.length; i++) {
contents[i].classList.remove("active");
}
const tabs = document.getElementsByClassName("tab-btn");
for (let i = 0; i < tabs.length; i++) {
tabs[i].classList.remove("active");
}
document.getElementById(policyName).classList.add("active");
event.currentTarget.classList.add("active");
}
</script>
</body>
</html>
CSS (styles.css)
/* Global Styles */
:root {
--primary-color: #e67e22; /* Orange */
--secondary-color: #2c3e50; /* Dark Blue */
--light-color: #f8f9fa;
--dark-color: #333;
--success-color: #27ae60;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background-color: #f5f5f5;
color: var(--dark-color);
line-height: 1.6;
}
/* Header Styles */
header {
background-color: white;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
padding: 1rem 5%;
display: flex;
justify-content: space-between;
align-items: center;
position: sticky;
top: 0;
z-index: 100;
}
.logo img {
height: 50px;
}
nav ul {
display: flex;
list-style: none;
}
nav ul li {
margin-left: 2rem;
}
nav ul li a {
text-decoration: none;
color: var(--dark-color);
font-weight: 600;
transition: color 0.3s;
}
nav ul li a:hover, .active {
color: var(--primary-color);
}
/* Main Content Styles */
main {
padding: 2rem 5%;
min-height: 80vh;
}
.policy-container {
max-width: 1000px;
margin: 0 auto;
background: white;
border-radius: 8px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
padding: 2rem;
}
.policy-tabs {
display: flex;
border-bottom: 1px solid #eee;
margin-bottom: 2rem;
}
.tab-btn {
padding: 1rem 2rem;
background: none;
border: none;
cursor: pointer;
font-size: 1rem;
color: var(--dark-color);
transition: all 0.3s;
}
.tab-btn:hover, .tab-btn.active {
color: var(--primary-color);
border-bottom: 3px solid var(--primary-color);
}
.policy-content {
display: none;
animation: fadeIn 0.5s;
}
.policy-content.active {
display: block;
}
h1 {
color: var(--secondary-color);
margin-bottom: 1rem;
font-size: 2rem;
}
h2 {
color: var(--primary-color);
margin: 1.5rem 0 1rem;
font-size: 1.5rem;
}
p {
margin-bottom: 1rem;
}
/* Footer Styles */
footer {
background-color: var(--secondary-color);
color: white;
padding: 2rem 5%;
}
.footer-content {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
margin-bottom: 2rem;
}
.footer-logo img {
height: 50px;
margin-bottom: 1rem;
}
.footer-links h3, .footer-contact h3 {
margin-bottom: 1rem;
font-size: 1.2rem;
}
.footer-links ul {
list-style: none;
}
.footer-links ul li {
margin-bottom: 0.5rem;
}
.footer-links ul li a {
color: white;
text-decoration: none;
transition: color 0.3s;
}
.footer-links ul li a:hover {
color: var(--primary-color);
}
.footer-contact p {
margin-bottom: 0.5rem;
display: flex;
align-items: center;
}
.footer-contact i {
margin-right: 0.5rem;
}
.footer-bottom {
text-align: center;
padding-top: 1rem;
border-top: 1px solid rgba(255, 255, 255, 0.1);
}
/* Animations */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
/* Responsive Design */
@media (max-width: 768px) {
nav ul {
display: none;
}
.policy-tabs {
flex-direction: column;
}
.footer-content {
flex-direction: column;
}
.footer-logo, .footer-links, .footer-contact {
margin-bottom: 2rem;
}
}
Key Features:
- Responsive Design: Works on mobile, tablet, and desktop.
- Tabbed Interface: Users can switch between policies without page reloads.
- Consistent Branding: Uses your restaurant’s colors (customize
--primary-color and --secondary-color).
- SEO-Friendly: Semantic HTML and proper heading hierarchy.
- Razorpay Compliance: Includes links to Razorpay’s policies.
How to Use:
- Replace
[Restaurant Name], logo.png, and contact details.
- Add the full content of each policy in their respective
<div> sections.
- Host the files on your server and link them in your website’s footer.
For a live demo, you can test this code in a browser or use tools like CodePen.