How to Build a Professional Portfolio Website from Scratch (Free Step-by-Step Guide)
BRIGHTATLAS • WEB DEVELOPMENT • COMPLETE BEGINNER-FRIENDLY TUTORIAL
What You Will Build in This Tutorial
By the end of this guide, you will have a personal portfolio website with:
A clear introduction, headline and call-to-action buttons.
A section that explains who you are and what you can do.
Cards displaying your work, demos and source-code links.
A practical way for visitors to reach you.
A design that adapts to phones, tablets and desktops.
A public website address you can share with others.
A portfolio is more than a beautiful webpage. It is a carefully organised presentation of your skills, experience, projects and professional identity. A good portfolio helps a visitor understand what you do, what you have built and how to contact you.
You do not need to be an experienced developer to create your first portfolio. You need a clear plan, a few basic web technologies and the patience to follow the steps in order.
1. Why Do You Need a Portfolio Website?
Imagine two beginners applying for the same freelance project. Both say they know HTML, CSS and JavaScript. One sends only a short message describing their skills. The other shares a clean website showing three projects, screenshots, a short introduction and contact information.
The second person gives the client something concrete to evaluate. That does not guarantee a job, but it makes their work easier to understand.
For students
Present class projects, learning achievements, experiments and technical skills in one organised place.
For freelancers
Show real examples of websites, designs, writing or other services you can deliver.
For job seekers
Give recruiters an additional way to review your work and professional background.
For career changers
Demonstrate newly acquired skills through practical projects, even when your previous job was in another field.
Portfolio vs. resume: What is the difference?
| Resume | Portfolio website |
|---|---|
| A short summary of your education, experience and skills. | A visual presentation of your work and professional identity. |
| Usually follows a document format. | Can include live projects, images, demos and links. |
| Often tailored to a specific job. | Can serve as a central professional profile. |
| Typically shared as a PDF or document. | Shared through a public website address. |
2. Plan Your Portfolio Before Writing Code
One of the most common beginner mistakes is opening a code editor immediately and starting to write random HTML. A better approach is to decide what the website should communicate before building it.
Step 1: Decide your audience
Ask yourself: Who should visit this website?
- A company recruiter looking for a junior developer?
- A small business owner looking for a website designer?
- A client who needs a landing page?
- A college or training programme reviewing your projects?
Your answer will influence your headline, projects, skills and contact options.
Step 2: Write a clear professional headline
A weak headline says:
Welcome to my website. I am a hardworking person.
A more useful headline says:
Hi, I'm Alex Morgan.
I build responsive websites for small businesses.
The second version tells visitors who you are and what you do. Be honest about your current experience level. If you are learning, say so rather than claiming to be an expert.
Step 3: Choose the right sections
| Section | What to include | Why it matters |
|---|---|---|
| Home | Name, role, short introduction and main buttons. | Creates a clear first impression. |
| About | Background, interests and career direction. | Provides context about you. |
| Skills | Technologies and tools you genuinely know. | Shows your capabilities. |
| Projects | Project description, screenshots, demo and code. | Provides evidence of practical work. |
| Contact | Email or another reliable contact method. | Makes it easy to reach you. |
Step 4: Collect your content
Before coding, prepare the following:
- Your name and professional role.
- A short introduction of approximately 40–70 words.
- A list of 4–8 genuine skills.
- At least 2–3 projects, if available.
- A professional email address.
- A photograph, only if you are comfortable sharing one.
- Links to your GitHub, LinkedIn or other relevant profiles.
3. Tools and Technologies You Need
You can build this project without buying expensive software. A computer, a browser and a code editor are enough to get started.
HTML
HTML creates the structure of a webpage: headings, paragraphs, navigation, images, links and forms.
CSS
CSS controls the appearance: colours, typography, spacing, layouts, borders, shadows and responsive design.
JavaScript
JavaScript adds behaviour: mobile menus, interactions, form validation and dynamic features.
Code editor
Visual Studio Code is a popular free editor for creating and editing website files.
Useful tools
- Visual Studio Code — code editor.
- MDN Learn Web Development — structured web development learning material.
- Google Fonts — web typography.
- GitHub — store and manage source code.
- GitHub Pages — publish static websites.
How these technologies work together
The Three Layers of a Website
The content and elements
The visual design and layout
The interactions and logic
Together, they create the website visitors experience in their browser.
4. Understand the Website File Structure
For this beginner project, we will keep everything in a single HTML file. This makes the first build easier to understand and deploy. Later, you can separate the CSS and JavaScript into their own files.
Create a folder on your computer named:
my-portfolio
Inside that folder, create this file:
my-portfolio/
└── index.html
The index.html file will contain the page structure, styling and JavaScript.
index.html, not index.html.txt. If Windows hides file extensions, enable them in File Explorer's View settings.
What is an HTML document?
A basic HTML page starts with a document declaration and contains a head and a body.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My Portfolio</title>
</head>
<body>
<h1>Hello, world!</h1>
</body>
</html>
Here is what the main parts mean:
<!DOCTYPE html>tells the browser to use modern HTML standards mode.<html lang="en">identifies the document language as English.<head>contains page metadata and linked resources.<body>contains the content visitors see.<h1>represents the main page heading.
5. Build the Complete Portfolio Website
Now we will create the actual project. Follow the steps carefully and keep the file name as index.html.
Open Visual Studio Code, select File → Open Folder and choose your my-portfolio folder. Create a new file named index.html.
Copy the entire code below into index.html. This is a working starter portfolio. Replace the sample details with your own information before publishing.
Complete source code: HTML + CSS + JavaScript
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Alex Morgan | Web Developer Portfolio</title>
<meta name="description"
content="Explore the portfolio, skills and projects of Alex Morgan, a beginner-friendly web developer.">
<meta name="theme-color" content="#101a2e">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap"
rel="stylesheet">
<style>
:root {
--bg: #0c1425;
--panel: #121e33;
--panel-light: #1a2942;
--text: #f5f7ff;
--muted: #a8b5ca;
--cyan: #41d9e8;
--purple: #9a7bff;
--border: rgba(255,255,255,.12);
--max-width: 1120px;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
scroll-behavior: smooth;
scroll-padding-top: 85px;
}
body {
font-family: "DM Sans", Arial, sans-serif;
background: var(--bg);
color: var(--text);
line-height: 1.7;
}
a {
color: inherit;
text-decoration: none;
}
button {
font: inherit;
}
.container {
width: min(92%, var(--max-width));
margin: auto;
}
.site-header {
position: sticky;
top: 0;
z-index: 100;
background: rgba(12,20,37,.94);
backdrop-filter: blur(15px);
border-bottom: 1px solid var(--border);
}
.nav {
min-height: 75px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 20px;
}
.brand {
font-size: 22px;
font-weight: 800;
letter-spacing: -.7px;
}
.brand span {
color: var(--cyan);
}
.nav-links {
display: flex;
align-items: center;
gap: 27px;
list-style: none;
}
.nav-links a {
color: var(--muted);
font-size: 14px;
transition: color .2s;
}
.nav-links a:hover,
.nav-links a:focus-visible {
color: var(--cyan);
}
.menu-button {
display: none;
background: var(--panel-light);
color: var(--text);
border: 1px solid var(--border);
padding: 9px 12px;
border-radius: 9px;
cursor: pointer;
}
.hero {
padding: 100px 0 85px;
background:
radial-gradient(circle at 80% 20%, rgba(65,217,232,.16), transparent 30%),
radial-gradient(circle at 10% 70%, rgba(154,123,255,.15), transparent 32%);
}
.hero-grid {
display: grid;
grid-template-columns: 1.3fr .7fr;
align-items: center;
gap: 55px;
}
.eyebrow {
color: var(--cyan);
font-weight: 700;
font-size: 13px;
letter-spacing: 2px;
text-transform: uppercase;
}
.hero h1 {
font-size: clamp(39px,6vw,68px);
line-height: 1.08;
letter-spacing: -2.5px;
margin: 18px 0;
}
.gradient-text {
background: linear-gradient(90deg,var(--cyan),var(--purple));
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.hero-copy {
color: var(--muted);
max-width: 650px;
font-size: 17px;
}
.button-row {
display: flex;
flex-wrap: wrap;
gap: 13px;
margin-top: 28px;
}
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 10px;
padding: 12px 20px;
font-weight: 700;
font-size: 14px;
border: 1px solid var(--border);
transition: transform .2s, opacity .2s;
}
.btn:hover {
transform: translateY(-3px);
}
.btn-primary {
background: var(--cyan);
color: #081421;
border-color: var(--cyan);
}
.btn-outline {
color: var(--text);
background: transparent;
}
.profile-visual {
min-height: 320px;
border-radius: 30px;
border: 1px solid var(--border);
background:
radial-gradient(circle at 50% 25%, rgba(65,217,232,.35), transparent 45%),
linear-gradient(145deg,#1c3151,#111b31);
display: grid;
place-items: center;
text-align: center;
padding: 25px;
}
.avatar {
width: 145px;
height: 145px;
border-radius: 50%;
display: grid;
place-items: center;
margin: auto;
font-size: 52px;
font-weight: 800;
color: #0c1425;
background: linear-gradient(135deg,var(--cyan),var(--purple));
border: 5px solid rgba(255,255,255,.16);
}
.profile-visual p {
color: var(--muted);
margin-top: 12px;
font-size: 14px;
}
.section {
padding: 85px 0;
}
.section-alt {
background: rgba(255,255,255,.025);
}
.section-heading {
max-width: 690px;
margin-bottom: 35px;
}
.section-heading .eyebrow {
margin-bottom: 10px;
}
.section-heading h2 {
font-size: clamp(29px,4vw,42px);
line-height: 1.2;
margin-bottom: 14px;
}
.section-heading p {
color: var(--muted);
}
.about-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 30px;
}
.panel {
background: var(--panel);
border: 1px solid var(--border);
border-radius: 17px;
padding: 27px;
}
.panel h3 {
margin-bottom: 12px;
font-size: 21px;
}
.panel p {
color: var(--muted);
}
.skill-list {
display: flex;
flex-wrap: wrap;
gap: 11px;
margin-top: 18px;
}
.skill {
background: rgba(65,217,232,.1);
color: #a8f5ff;
border: 1px solid rgba(65,217,232,.2);
border-radius: 30px;
padding: 7px 13px;
font-size: 13px;
font-weight: 600;
}
.project-grid {
display: grid;
grid-template-columns: repeat(3,1fr);
gap: 20px;
}
.project-card {
background: var(--panel);
border: 1px solid var(--border);
border-radius: 17px;
overflow: hidden;
transition: transform .25s, border-color .25s;
}
.project-card:hover {
transform: translateY(-5px);
border-color: rgba(65,217,232,.5);
}
.project-art {
min-height: 170px;
display: grid;
place-items: center;
font-size: 42px;
background: linear-gradient(135deg,#193e68,#49327b);
}
.project-card:nth-child(2) .project-art {
background: linear-gradient(135deg,#164b57,#273c75);
}
.project-card:nth-child(3) .project-art {
background: linear-gradient(135deg,#5b3c27,#49327b);
}
.project-content {
padding: 22px;
}
.project-content p {
color: var(--muted);
font-size: 14px;
margin: 10px 0 17px;
}
.project-links {
display: flex;
gap: 15px;
flex-wrap: wrap;
font-size: 13px;
color: var(--cyan);
font-weight: 700;
}
.timeline {
border-left: 2px solid var(--cyan);
padding-left: 24px;
margin-left: 8px;
}
.timeline-item {
position: relative;
padding: 0 0 25px;
}
.timeline-item:before {
content: "";
position: absolute;
width: 12px;
height: 12px;
border-radius: 50%;
background: var(--cyan);
left: -31px;
top: 7px;
}
.timeline-item p {
color: var(--muted);
margin-top: 5px;
}
.contact-grid {
display: grid;
grid-template-columns: .8fr 1.2fr;
gap: 25px;
}
.contact-form {
display: grid;
gap: 13px;
}
.contact-form label {
font-size: 13px;
color: var(--muted);
font-weight: 600;
}
.contact-form input,
.contact-form textarea {
width: 100%;
padding: 13px;
border-radius: 9px;
border: 1px solid var(--border);
background: #0d182b;
color: var(--text);
font: inherit;
margin-top: 5px;
}
.contact-form textarea {
min-height: 125px;
resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
outline: 2px solid var(--cyan);
outline-offset: 2px;
}
.form-note {
color: var(--muted);
font-size: 12px;
}
.footer {
border-top: 1px solid var(--border);
padding: 30px 0;
color: var(--muted);
text-align: center;
font-size: 13px;
}
@media(max-width:850px) {
.hero-grid,
.about-grid,
.contact-grid {
grid-template-columns: 1fr;
}
.project-grid {
grid-template-columns: repeat(2,1fr);
}
.hero {
padding: 75px 0;
}
}
@media(max-width:620px) {
.nav {
min-height: 68px;
}
.menu-button {
display: block;
}
.nav-links {
display: none;
position: absolute;
top: 68px;
left: 0;
right: 0;
background: #101d33;
padding: 20px 5%;
flex-direction: column;
align-items: flex-start;
gap: 17px;
border-bottom: 1px solid var(--border);
}
.nav-links.open {
display: flex;
}
.hero {
padding: 60px 0;
}
.hero h1 {
letter-spacing: -1.5px;
}
.project-grid {
grid-template-columns: 1fr;
}
.section {
padding: 65px 0;
}
.profile-visual {
min-height: 270px;
}
}
@media(prefers-reduced-motion:reduce) {
html { scroll-behavior: auto; }
*, *:before, *:after {
transition-duration: .01ms !important;
}
}
</style>
</head>
<body>
<header class="site-header">
<nav class="nav container" aria-label="Main navigation">
<a href="#home" class="brand">Alex<span>Morgan.</span></a>
<button class="menu-button"
id="menuButton"
aria-label="Open navigation menu"
aria-expanded="false"
aria-controls="navLinks">
☰ Menu
</button>
<ul class="nav-links" id="navLinks">
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#skills">Skills</a></li>
<li><a href="#projects">Projects</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
</header>
<main>
<section class="hero" id="home">
<div class="container hero-grid">
<div>
<p class="eyebrow">Hello, I'm Alex Morgan</p>
<h1>I build <span class="gradient-text">modern websites</span> that make ideas real.</h1>
<p class="hero-copy">
I'm an aspiring web developer who enjoys creating clean,
responsive and user-friendly digital experiences.
</p>
<div class="button-row">
<a href="#projects" class="btn btn-primary">Explore My Work →</a>
<a href="#contact" class="btn btn-outline">Contact Me</a>
</div>
</div>
<div class="profile-visual">
<div>
<div class="avatar" aria-label="Initials AM">AM</div>
<h2 style="margin-top:18px">Alex Morgan</h2>
<p>Web Developer • Learner • Problem Solver</p>
</div>
</div>
</div>
</section>
<section class="section section-alt" id="about">
<div class="container">
<div class="section-heading">
<p class="eyebrow">A little about me</p>
<h2>Turning curiosity into practical projects.</h2>
<p>A short introduction to who I am, what I enjoy and what I am learning.</p>
</div>
<div class="about-grid">
<div class="panel">
<h3>My Story</h3>
<p>
I am learning modern web development and enjoy turning
ideas into useful websites. I focus on writing clear code,
improving my design skills and building practical projects.
</p>
</div>
<div class="panel" id="skills">
<h3>My Skills</h3>
<p>These are example skills. Replace them with technologies you can actually use.</p>
<div class="skill-list">
<span class="skill">HTML5</span>
<span class="skill">CSS3</span>
<span class="skill">JavaScript</span>
<span class="skill">Responsive Design</span>
<span class="skill">Git Basics</span>
<span class="skill">Problem Solving</span>
</div>
</div>
</div>
</div>
</section>
<section class="section" id="projects">
<div class="container">
<div class="section-heading">
<p class="eyebrow">Selected work</p>
<h2>Projects that show what I can do.</h2>
<p>A portfolio becomes more convincing when visitors can inspect real examples of your work.</p>
</div>
<div class="project-grid">
<article class="project-card">
<div class="project-art" aria-hidden="true">☕</div>
<div class="project-content">
<h3>Cafe Landing Page</h3>
<p>A responsive landing page concept for a local cafe, with menu highlights and contact details.</p>
<div class="project-links">
<a href="#">Live Demo</a>
<a href="#">Source Code</a>
</div>
</div>
</article>
<article class="project-card">
<div class="project-art" aria-hidden="true">📋</div>
<div class="project-content">
<h3>Task Planner</h3>
<p>A simple interface concept for organising everyday tasks and priorities.</p>
<div class="project-links">
<a href="#">Live Demo</a>
<a href="#">Source Code</a>
</div>
</div>
</article>
<article class="project-card">
<div class="project-art" aria-hidden="true">🛍️</div>
<div class="project-content">
<h3>Product Showcase</h3>
<p>A product page concept with clear descriptions, visual hierarchy and calls to action.</p>
<div class="project-links">
<a href="#">Live Demo</a>
<a href="#">Source Code</a>
</div>
</div>
</article>
</div>
</div>
</section>
<section class="section section-alt" id="journey">
<div class="container">
<div class="section-heading">
<p class="eyebrow">My learning journey</p>
<h2>Always learning. Always building.</h2>
</div>
<div class="panel timeline">
<div class="timeline-item">
<h3>Learning HTML</h3>
<p>Understanding page structure, semantic elements and accessible content.</p>
</div>
<div class="timeline-item">
<h3>Practising CSS</h3>
<p>Working with layouts, colours, typography and responsive design.</p>
</div>
<div class="timeline-item">
<h3>Building with JavaScript</h3>
<p>Adding interactions, validation and useful browser behaviour.</p>
</div>
</div>
</div>
</section>
<section class="section" id="contact">
<div class="container">
<div class="section-heading">
<p class="eyebrow">Let's connect</p>
<h2>Have a project or an opportunity?</h2>
<p>Use the contact details or send a message using the form below.</p>
</div>
<div class="contact-grid">
<div class="panel">
<h3>Contact Details</h3>
<p>Email: hello@example.com</p>
<p>Location: Your City, Country</p>
<p>GitHub: github.com/yourusername</p>
<p>LinkedIn: linkedin.com/in/yourusername</p>
</div>
<div class="panel">
<form class="contact-form" id="contactForm">
<label>
Your name
<input type="text" id="visitorName"
placeholder="Enter your name" required maxlength="80">
</label>
<label>
Your email
<input type="email" id="visitorEmail"
placeholder="name@example.com" required maxlength="120">
</label>
<label>
Your message
<textarea id="visitorMessage"
placeholder="Tell me about your project..."
required maxlength="2000"></textarea>
</label>
<button type="submit" class="btn btn-primary">
Prepare Email →
</button>
<p class="form-note" id="formStatus" aria-live="polite">
This demonstration opens your email application. It does not store messages on a server.
</p>
</form>
</div>
</div>
</div>
</section>
</main>
<footer class="footer">
<div class="container">
<p>© <span id="year"></span> Alex Morgan. Built with HTML, CSS and JavaScript.</p>
</div>
</footer>
<script>
const menuButton = document.getElementById("menuButton");
const navLinks = document.getElementById("navLinks");
menuButton.addEventListener("click", function () {
const isOpen = navLinks.classList.toggle("open");
menuButton.setAttribute("aria-expanded", String(isOpen));
menuButton.textContent = isOpen ? "✕ Close" : "☰ Menu";
});
document.querySelectorAll(".nav-links a").forEach(function (link) {
link.addEventListener("click", function () {
navLinks.classList.remove("open");
menuButton.setAttribute("aria-expanded", "false");
menuButton.textContent = "☰ Menu";
});
});
document.getElementById("year").textContent =
new Date().getFullYear();
document.getElementById("contactForm").addEventListener("submit",
function (event) {
event.preventDefault();
const name = document.getElementById("visitorName").value.trim();
const email = document.getElementById("visitorEmail").value.trim();
const message = document.getElementById("visitorMessage").value.trim();
const status = document.getElementById("formStatus");
if (!name || !email || !message) {
status.textContent = "Please complete all fields.";
return;
}
if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) {
status.textContent = "Please enter a valid email address.";
return;
}
// Replace this sample address with your real email address.
const ownerEmail = "hello@example.com";
const subject = encodeURIComponent(
"Portfolio enquiry from " + name
);
const body = encodeURIComponent(
"Name: " + name +
"\nEmail: " + email +
"\n\nMessage:\n" + message
);
status.textContent =
"Your email application should open with the message prepared.";
window.location.href =
"mailto:" + ownerEmail +
"?subject=" + subject +
"&body=" + body;
}
);
</script>
</body>
</html>
# are also placeholders; add real demo and repository URLs.
6. Customise the Website With Your Own Information
Now that the starter project is ready, the next task is to make it genuinely yours. A portfolio should not look like a copied template with someone else's name.
Example 1: Change the name and role
Find this text in the HTML:
<a href="#home" class="brand">Alex<span>Morgan.</span></a>
Replace it with your own name. For example:
<a href="#home" class="brand">Jordan<span>Lee.</span></a>
Example 2: Write a stronger introduction
Instead of saying you are the best developer, explain what you are learning and what you can build.
Beginner example
"I am learning HTML, CSS and JavaScript. I enjoy building simple websites and improving my design and coding skills through practical projects."
Freelancer example
"I create responsive landing pages and small business websites with a focus on clear layouts, mobile usability and easy navigation."
Example 3: Add a real project
Suppose you have built a cafe website. Describe the problem, your contribution and the result.
Project: Urban Brew Cafe Website
Goal:
Create a simple website for a cafe.
My contribution:
- Designed the homepage.
- Added a menu section.
- Created a contact section.
- Made the layout responsive.
Technologies:
HTML, CSS and JavaScript.
Project links:
Live Demo: [Add your real URL]
Source Code: [Add your GitHub URL]
This description is more useful than writing "I made a beautiful website" because it tells visitors what you actually did.
Example 4: Add a real photograph
If you want to use a portrait, replace the initials circle with an image:
<img
src="images/my-photo.jpg"
alt="Portrait of Jordan Lee"
width="300"
height="300">
Create an images folder and place your photo inside it. Use a clear, appropriately cropped image and compress it before publishing. Do not use somebody else's photograph as if it were your own.
Example 5: Replace project placeholders
Find the project link:
<a href="#">Live Demo</a>
Replace the hash with your actual project URL:
<a href="https://your-project.example/" target="_blank" rel="noopener">
Live Demo
</a>
Only use a real working URL. A button that leads nowhere damages the visitor's experience.
7. Understand How the Important Code Works
You do not need to memorise every line. You should, however, understand the main ideas so you can make changes without depending on someone else for every small edit.
A. The viewport meta tag
<meta name="viewport" content="width=device-width, initial-scale=1.0">
This tells mobile browsers to use the device's actual viewport width and an initial scale of 1. Without it, a page may appear zoomed out or behave unexpectedly on phones.
B. CSS variables
:root {
--bg: #0c1425;
--cyan: #41d9e8;
--purple: #9a7bff;
}
Variables allow you to reuse values. If you want to change the cyan accent colour throughout the website, update the variable once instead of searching for every occurrence.
C. CSS Grid
.hero-grid {
display: grid;
grid-template-columns: 1.3fr .7fr;
gap: 55px;
}
CSS Grid divides the hero section into two columns. The first column receives more space than the second. Grid is especially useful for layouts that have rows and columns.
D. Flexbox
.button-row {
display: flex;
flex-wrap: wrap;
gap: 13px;
}
Flexbox places buttons in a row. When the screen becomes narrow, flex-wrap: wrap allows them to move onto another line instead of overflowing.
E. JavaScript event listeners
menuButton.addEventListener("click", function () {
navLinks.classList.toggle("open");
});
This listens for a click on the menu button. When clicked, JavaScript adds or removes the open class, which controls whether the mobile navigation is visible.
F. Form validation
if (!name || !email || !message) {
status.textContent = "Please complete all fields.";
return;
}
This checks whether the required fields are empty. It is a basic client-side check, not a security system. A real form service or backend should validate and protect submitted data on the server too.
8. Make Your Portfolio Mobile-Friendly
A professional portfolio should work on more than a laptop. Visitors may open it on a phone, tablet or large desktop screen. Responsive design allows the layout to adapt to different viewport sizes.
What is a media query?
A media query applies CSS rules when certain conditions about the screen or device are met.
@media (max-width: 620px) {
.project-grid {
grid-template-columns: 1fr;
}
.hero {
padding: 60px 0;
}
}
In this example, the project cards change to one column when the viewport is 620 pixels wide or narrower.
Test these screen sizes
| Test device | What to inspect |
|---|---|
| Small phone | Text readability, menu, buttons and horizontal overflow. |
| Large phone | Spacing, project cards and contact form. |
| Tablet | Two-column sections and navigation. |
| Laptop | Hero layout, content width and visual balance. |
| Large desktop | Maximum content width and whitespace. |
How to test using Chrome DevTools
- Open your portfolio in Google Chrome.
- Right-click anywhere on the page and choose Inspect.
- Click the device toolbar icon, or press
Ctrl + Shift + M. - Select a phone or tablet preset.
- Scroll through every section and inspect the layout.
- Try different widths and orientations.
9. Make Your Portfolio More Accessible
Good design is not only about colours and animation. People should be able to understand and navigate your website using different devices and assistive technologies.
Use meaningful HTML elements
Use <header> for the page header, <nav> for navigation, <main> for the primary content, <section> for thematic groups and <footer> for footer information.
Write useful image descriptions
<img src="project-dashboard.jpg"
alt="Screenshot of a task management dashboard"
width="900"
height="600">
Alternative text should explain the meaningful information in an image. Avoid using generic text such as "image123" or repeating decorative text.
Make keyboard navigation possible
- Use links for navigation and buttons for actions.
- Keep visible focus styles.
- Make sure menus can be opened and closed using a keyboard.
- Use labels for form fields.
- Maintain readable contrast between text and background.
Respect reduced-motion preferences
Some visitors prefer less animation. The example project includes a prefers-reduced-motion rule to reduce motion effects when the operating system requests it.
10. Test Your Website Before Publishing
Before sharing the portfolio, check that the important parts actually work. A website can look excellent in an editor and still contain broken links, missing images or layout problems.
Content checks
- Name is correct.
- Introduction is clear.
- Skills are accurate.
- Projects are genuine.
Technical checks
- Navigation links work.
- Menu opens on mobile.
- No horizontal overflow.
- Images load correctly.
Contact checks
- Email address is correct.
- Form fields are labelled.
- Empty fields are rejected.
- Email application opens.
Professional checks
- No fake testimonials.
- No placeholder links.
- No spelling mistakes.
- Contact details are current.
Check your browser console
Open Chrome DevTools, select the Console tab and refresh the page. Look for JavaScript errors. A red error message may indicate that an element ID is incorrect, a script has failed or a resource could not load.
Check the page with Lighthouse
Chrome Lighthouse can provide automated feedback on performance, accessibility, best practices and SEO. It is a useful diagnostic tool, but its score is not a guarantee of search rankings or a substitute for manual testing.
- Open the website in Chrome.
- Open DevTools using Inspect.
- Find the Lighthouse tab.
- Select the categories you want to audit.
- Run the report.
- Review the opportunities and warnings.
11. Publish Your Portfolio Website for Free
Your website currently runs on your own computer. To make it accessible to other people, you need to publish it on a hosting service.
For a simple portfolio built with HTML, CSS and browser-based JavaScript, static hosting is usually sufficient. If you later add user accounts, databases or server-side processing, you will need a suitable backend service as well.
Option A: GitHub Pages
GitHub Pages can publish static website files directly from a GitHub repository. GitHub's official documentation explains how to create a repository, add an index.html file and configure the publishing source.
- Create or sign in to your GitHub account.
- Create a new repository for your portfolio.
- For a personal user site, the repository can be named
yourusername.github.io. - Upload your
index.htmland any related image or asset folders. - Open the repository's Settings.
- Select Pages from the sidebar.
- Under Build and deployment, choose a publishing source such as Deploy from a branch.
- Select the correct branch and folder, then save.
- Wait for deployment and open the published URL.
Example of the URL format:
https://yourusername.github.io/
For a project repository, the URL usually includes the repository name:
https://yourusername.github.io/project-name/
Official guides:
Option B: Netlify
Netlify offers another way to publish a static website. Its manual deployment workflow allows you to upload a project folder or its output folder through the dashboard.
- Create or sign in to your Netlify account.
- Open the Netlify dashboard.
- Choose the manual deployment or drag-and-drop publishing option.
- Upload the folder containing your website files.
- Make sure
index.htmlis at the top level of the published folder. - Wait for the deployment to complete.
- Open the generated website URL and test every section.
Official instructions: Netlify — Create Deploys.
Which hosting option should you choose?
| Feature | GitHub Pages | Netlify |
|---|---|---|
| Static HTML/CSS/JS | Supported | Supported |
| Beginner deployment | Repository and Pages setup | Manual upload or Git workflow |
| Version control | Built around GitHub repositories | Can connect to Git repositories |
| Custom domain | Supported | Supported, subject to plan and configuration |
| Backend database | Not provided by Pages itself | Requires separate backend or service |
Hosting plans, limits and features can change. Check the official provider documentation before choosing a plan.
12. Basic SEO for Your Portfolio Website
SEO stands for Search Engine Optimization. It is the process of making a website easier for search engines to understand and potentially show in relevant search results.
For a personal portfolio, the goal is not to repeat keywords everywhere. The goal is to explain who you are, what you do and what visitors can find on the page.
1. Write a descriptive page title
<title>Jordan Lee | Front-End Web Developer Portfolio</title>
A useful title identifies the person and the purpose of the page.
2. Add a meaningful meta description
<meta name="description"
content="Explore Jordan Lee's web development projects,
skills and responsive website designs.">
3. Use headings in a logical order
Use one clear main heading and meaningful section headings. Headings should describe the content that follows rather than exist only for visual decoration.
4. Use descriptive links
Instead of writing "click here" for every link, use meaningful text such as "View the cafe website demo" or "Explore the source code on GitHub."
5. Make the website useful and accessible
Clear content, working navigation, relevant images and a mobile-friendly layout improve the experience for real visitors. Do not expect SEO metadata alone to make a new website rank.
13. Common Beginner Mistakes to Avoid
1. Using too many colours
Choose a small colour palette and use it consistently. Too many unrelated colours can make the page feel confusing.
2. Adding skills you do not have
Do not list advanced frameworks or tools just because they look impressive. Be honest and show what you can actually demonstrate.
3. Publishing empty project cards
Every project should explain what it does and what you contributed. If a demo is not ready, do not pretend it is live.
4. Ignoring mobile visitors
A desktop-only layout can be difficult to use on a phone. Test narrow screens before launch.
5. Using a contact form that does nothing
A front-end form does not automatically send or save data. Connect a trusted form service or backend if you need actual message delivery.
6. Forgetting to update sample information
Replace demo names, email addresses, social links and project placeholders. A visitor should never have to guess whether your information is real.
7. Making the website unnecessarily complicated
Your first portfolio does not need complex animations, a large framework or a database. Start with a fast, clear static website and add features only when they solve a real problem.
14. Final Portfolio Launch Checklist
Before sharing your portfolio with a recruiter, client or friend, review this checklist:
- My name and role are correct.
- My introduction clearly explains what I do.
- My skills accurately reflect my abilities.
- My projects are genuine and clearly described.
- Live demo links open the correct websites.
- Source-code links point to the correct repositories.
- My contact email is correct.
- The mobile menu works.
- The website looks good on a phone and desktop.
- Images have useful alternative text.
- There are no obvious spelling mistakes.
- The browser console has no unresolved errors.
- The website is published and its public URL works.
- I have removed all sample information and placeholder links.
15. Frequently Asked Questions
Q1. Can I build a portfolio website without knowing coding?
You can use website builders without coding, but this tutorial teaches you to build a website with HTML, CSS and JavaScript. You can follow the instructions as a beginner and learn what each part does.
Q2. Is HTML, CSS and JavaScript enough for a portfolio?
Yes. These technologies are enough for a static personal portfolio with sections, project cards, responsive styling and basic browser interactions.
Q3. Can I host my portfolio for free?
Yes. Services such as GitHub Pages and Netlify offer ways to publish static websites. Check their current plan details and usage limits.
Q4. Does the contact form in this project send messages?
The example prepares an email and opens the visitor's default email application using a mailto link. It does not securely store messages or send them through a server. For a production contact form, connect a trusted form service or build a backend.
Q5. How many projects should a beginner include?
Start with two or three well-explained projects. Quality, clarity and your actual contribution matter more than filling the page with many weak examples.
Q6. Should I include my photograph?
A professional photograph is optional. If you prefer privacy, you can use initials, an illustration or a simple visual identity instead.
Q7. Do I need a custom domain?
No. You can start with a hosting provider's free subdomain. A custom domain can be added later if you want a more memorable professional address.
Q8. Can I use this portfolio to get freelance clients?
It can help you present your work, but it does not guarantee clients. Add genuine examples, explain your services clearly, show working demos and provide a reliable way to contact you.
Q9. Should I learn React before building a portfolio?
No. You can build a strong first portfolio using plain HTML, CSS and JavaScript. Learn a framework later when you understand the fundamentals and have a project that benefits from it.
Q10. Can I update my portfolio after publishing?
Yes. Edit your source files and deploy the updated version. With a Git-connected workflow, pushing changes to the publishing branch can trigger a new deployment.
Your First Portfolio Is the Beginning, Not the Finish Line
Start with one useful page. Add real projects. Improve your design. Learn from every mistake. Over time, your portfolio can become a strong record of your progress and the work you are capable of doing.
Continue Learning Web Development → Publish with GitHub Pages →Official Learning and Reference Resources
The following resources can help you continue learning after completing this project. They are documentation and learning references, not claims that the tutorial's sample project has been independently tested on every browser or hosting provider.
- MDN Web Development Learning Area — HTML, CSS and JavaScript learning material.
- Build Your First Website Using HTML, CSS and JavaScript — a related beginner guide from BrightAtlas.
- MDN CSS Media Queries — responsive styling rules.
- MDN Responsive Images — image sizing and responsive image techniques.
- MDN Accessibility — accessibility concepts for web developers.
- GitHub Pages Quickstart — publishing a static website.
- Netlify Deployment Documentation — deploying website files.
- web.dev Learn — modern web development and user experience.
About this guide: This article is an educational beginner tutorial. Hosting plans, browser behaviour and third-party service features may change. Always consult the relevant provider's current documentation before deployment. Replace all sample portfolio information with your own accurate details.
Comments
Post a Comment