In this tutorial, you'll learn how to create a modern, responsive portfolio website using HTML, CSS, and JavaScript. Perfect for showcasing your skills and projects!
Step 1: HTML Structure
<div class="portfolio-container">
<header class="portfolio-header">
<h2>Zied MB</h2>
<p>Web Developer & Designer</p>
</header>
<nav class="portfolio-nav">
<a href="#about">About</a>
<a href="#projects">Projects</a>
<a href="#contact">Contact</a>
</nav>
<section id="about" class="portfolio-section">
<h3>About Me</h3>
<p>I'm a passionate web developer with 5+ years of experience...</p>
</section>
<section id="projects" class="portfolio-section">
<h3>Projects</h3>
<p>Here are some of my recent projects...</p>
</section>
<section id="contact" class="portfolio-section">
<h3>Contact</h3>
<p>Feel free to reach out to me at dounzay@gmail.com</p>
</section>
<footer class="portfolio-footer">
<p>© 2025 Zied MB. All rights reserved.</p>
</footer>
</div>
Step 2: CSS Styling
.portfolio-container {
max-width: 800px;
margin: 30px auto;
background: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.portfolio-header {
text-align: center;
margin-bottom: 30px;
}
.portfolio-header h2 {
font-size: 2rem;
color: #2c3e50;
}
.portfolio-header p {
font-size: 1rem;
color: #777;
}
.portfolio-nav {
display: flex;
justify-content: center;
gap: 20px;
margin-bottom: 30px;
}
.portfolio-nav a {
text-decoration: none;
color: #3498db;
font-weight: 600;
}
.portfolio-nav a:hover {
color: #2980b9;
}
.portfolio-section {
margin-bottom: 30px;
}
.portfolio-section h3 {
font-size: 1.5rem;
color: #2c3e50;
margin-bottom: 15px;
}
.portfolio-section p {
font-size: 1rem;
color: #555;
}
.portfolio-footer {
text-align: center;
margin-top: 30px;
color: #777;
}
Step 3: Add JavaScript (Optional)
Enhance your portfolio with interactive features like:
- Smooth scrolling for navigation links
- Dark mode toggle
- Dynamic project filtering
// Smooth Scrolling
document.querySelectorAll('.portfolio-nav a').forEach(anchor => {
anchor.addEventListener('click', function(e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
Step 4: Final Result
Zied MB
Web Developer & Designer
About Me
I'm a passionate web developer with 2+ years of experience...
Projects
Here are some of my recent projects...
Contact
Feel free to reach out to me at dounzay@gmail.com
Labels
Development