Here’s a complete, detailed guide for creating a HTML + CSS web page template, including layout, structure, styling, and explanation. This template is fully responsive, clean, and can be used as a starting point for any website.
1. Basic Structure of a Web Page Template
A modern web page typically includes:
- Header – Logo, navigation menu
- Hero section – Large banner or welcome area
- About/Content section – Information about your site
- Features/Services section – Highlights or offerings
- Footer – Contact info, copyright
2. HTML Template
Create index.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Web Page Template</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- Header Section -->
<header>
<div class="container">
<h1 class="logo">MyWebsite</h1>
<nav>
<ul class="nav-links">
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#services">Services</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
</div>
</header>
<!-- Hero Section -->
<section id="home" class="hero">
<div class="container">
<h2>Welcome to My Website</h2>
<p>Clean, responsive, and ready-to-use template.</p>
<a href="#about" class="btn">Learn More</a>
</div>
</section>
<!-- About Section -->
<section id="about" class="about">
<div class="container">
<h2>About Us</h2>
<p>This template is designed for beginners and professionals. Customize it as you like!</p>
</div>
</section>
<!-- Services Section -->
<section id="services" class="services">
<div class="container">
<h2>Our Services</h2>
<div class="service-cards">
<div class="card">
<h3>Design</h3>
<p>Modern and responsive website designs.</p>
</div>
<div class="card">
<h3>Development</h3>
<p>Clean, semantic HTML and CSS coding.</p>
</div>
<div class="card">
<h3>SEO</h3>
<p>Optimized for search engines and fast loading.</p>
</div>
</div>
</div>
</section>
<!-- Footer Section -->
<footer>
<div class="container">
<p>© 2025 MyWebsite. All rights reserved.</p>
</div>
</footer>
</body>
</html>
3. CSS Styling
Create style.css:
/* Global Styles */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
line-height: 1.6;
color: #333;
}
.container {
width: 90%;
max-width: 1100px;
margin: 0 auto;
}
/* Header */
header {
background: #007BFF;
color: white;
padding: 20px 0;
}
header .logo {
display: inline-block;
font-size: 24px;
font-weight: bold;
}
nav {
float: right;
}
.nav-links {
list-style: none;
margin: 0;
padding: 0;
}
.nav-links li {
display: inline-block;
margin-left: 20px;
}
.nav-links a {
color: white;
text-decoration: none;
font-weight: bold;
}
.nav-links a:hover {
text-decoration: underline;
}
/* Hero Section */
.hero {
background: url('hero-bg.jpg') no-repeat center center/cover;
color: white;
text-align: center;
padding: 100px 20px;
}
.hero .btn {
display: inline-block;
margin-top: 20px;
padding: 12px 25px;
background: #FF5733;
color: white;
text-decoration: none;
border-radius: 5px;
}
.hero .btn:hover {
background: #C70039;
}
/* About Section */
.about {
padding: 60px 20px;
background: #f4f4f4;
text-align: center;
}
/* Services Section */
.services {
padding: 60px 20px;
text-align: center;
}
.service-cards {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
margin-top: 30px;
}
.card {
background: white;
padding: 20px;
margin: 15px;
border-radius: 8px;
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
flex: 1 1 250px;
}
/* Footer */
footer {
background: #333;
color: white;
text-align: center;
padding: 20px 0;
}
/* Responsive */
@media (max-width: 768px) {
nav {
float: none;
text-align: center;
margin-top: 15px;
}
.nav-links li {
display: block;
margin: 10px 0;
}
.service-cards {
flex-direction: column;
}
}
4. Features of This Template
- Responsive Design
- Flexbox used for service cards
- Media queries for mobile view
- Clean Header and Navigation
- Floating navigation on desktop
- Stacked links on mobile
- Hero Section
- Full-width background image
- Call-to-action button
- Content Sections
- About and Services sections are separated and visually distinct
- Footer
- Simple and centered text
5. How to Customize
- Logo: Change
<h1 class="logo">to your text or image - Hero Image: Replace
hero-bg.jpgwith your own image - Colors: Update
backgroundandcolorin CSS - Content: Edit headings and paragraphs as needed
- Add Sections: Copy
<section>and style in CSS
6. Optional Enhancements
- Add JavaScript for interactive buttons, sliders, or menu toggle
- Use Google Fonts for typography
- Add social media icons in the footer
- Include animations with CSS
@keyframes
7. Summary
This template provides:
- HTML structure: header, hero, about, services, footer
- CSS styling: colors, layout, typography, responsive design
- Easy customization: edit text, images, colors
- Responsive: works on desktop and mobile
Other Courses:



