HTML Mini Project: A Personal Profile Page
In this project you will build a complete personal profile page — the kind of "about me" page a developer, student or artist might publish. You will build it in five steps, each adding one layer, and each step uses ideas from earlier lessons:
| Step | What you add | Lessons used |
|---|---|---|
| 1 | Page skeleton and semantic structure | Basic, Head, Semantics |
| 2 | Avatar, intro text and links | Images, Links, Formatting |
| 3 | Skills list and experience table | Lists, Tables |
| 4 | A contact form | Forms, Input Types, Validation |
| 5 | Styling and responsiveness | CSS, Classes, Responsive |
Feel free to replace the sample person, "Mai Nguyen", with yourself. Every playground is editable — change things and run them as you go.
Step 1 — The skeleton
Every good page starts with a correct document structure: the doctype, a language, a character set, the viewport meta tag for phones, and a title. Inside <body> we sketch the page with semantic elements so that browsers, search engines and screen readers understand its parts.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Mai Nguyen — Profile</title>
</head>
<body>
<header>
<h1>Mai Nguyen</h1>
<p>Junior web developer</p>
</header>
<main>
<section id="about"><h2>About me</h2></section>
<section id="skills"><h2>Skills</h2></section>
<section id="contact"><h2>Contact</h2></section>
</main>
<footer>
<p>© 2026 Mai Nguyen</p>
</footer>
</body>
</html>It looks plain, but the structure is already meaningful: there is one <h1>, sections each start with an <h2>, and <header>, <main> and <footer> divide the page.
Step 2 — Avatar, introduction and links
Next we add a profile picture, a short bio and some links. To keep the project working offline, the avatar is an inline SVG data URI — in a real site you would use src="me.jpg". Notice the alt text, the navigation that links to the section ids, and the use of <strong> and <em>.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Mai Nguyen — Profile</title>
</head>
<body>
<header>
<img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='50' fill='%23e34c26'/%3E%3Ctext x='50' y='62' font-size='36' text-anchor='middle' fill='white' font-family='sans-serif'%3EMN%3C/text%3E%3C/svg%3E"
alt="Mai Nguyen's avatar: the initials MN on an orange circle" width="96" height="96">
<h1>Mai Nguyen</h1>
<p>Junior web developer</p>
<nav>
<a href="#about">About</a> ·
<a href="#skills">Skills</a> ·
<a href="#contact">Contact</a>
</nav>
</header>
<main>
<section id="about">
<h2>About me</h2>
<p>I build <strong>accessible</strong>, fast websites and I am currently learning
<em>JavaScript</em>. In my free time I take photos and make bread.</p>
<p>Find me on <a href="https://github.com" target="_blank" rel="noopener">GitHub</a>
or download my <a href="cv.pdf" download>CV</a>.</p>
</section>
</main>
</body>
</html>Step 3 — Skills and experience
A list suits the skills (order does not matter, so <ul>), and a table suits the experience because the data has rows and columns. A <caption> and <th scope="col"> make the table understandable to screen readers.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Mai Nguyen — Skills</title>
</head>
<body>
<section id="skills">
<h2>Skills</h2>
<ul>
<li>HTML & semantic markup</li>
<li>CSS layout (Flexbox, Grid)</li>
<li>Basic JavaScript</li>
<li>Git</li>
</ul>
<h3>Experience</h3>
<table>
<caption>Work history</caption>
<thead>
<tr><th scope="col">Year</th><th scope="col">Role</th><th scope="col">Company</th></tr>
</thead>
<tbody>
<tr><td>2025–now</td><td>Junior developer</td><td>SoftShop</td></tr>
<tr><td>2024</td><td>Intern</td><td>Pixel Studio</td></tr>
</tbody>
</table>
</section>
</body>
</html>Step 4 — The contact form
A form lets visitors send a message. Each input has a matching <label>, the email field uses type="email" so the browser checks the format, and required and minlength give free validation. Because this page has no server, a tiny script intercepts the submission and shows a thank-you message instead.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Mai Nguyen — Contact</title>
</head>
<body>
<section id="contact">
<h2>Contact</h2>
<form id="contact-form">
<p><label for="name">Your name</label><br>
<input id="name" name="name" required autocomplete="name"></p>
<p><label for="email">Email</label><br>
<input id="email" name="email" type="email" required autocomplete="email"></p>
<p><label for="topic">Topic</label><br>
<select id="topic" name="topic">
<option>Job offer</option>
<option>Collaboration</option>
<option>Just saying hi</option>
</select></p>
<p><label for="msg">Message</label><br>
<textarea id="msg" name="message" rows="4" cols="30" minlength="10" required></textarea></p>
<button type="submit">Send</button>
</form>
<p id="thanks" hidden>Thanks! Your message was "sent" (this demo has no server).</p>
</section>
<script>
document.getElementById('contact-form').addEventListener('submit', function (e) {
e.preventDefault();
this.hidden = true;
document.getElementById('thanks').hidden = false;
});
</script>
</body>
</html>Step 5 — Putting it together with style
Finally we combine everything and add CSS in a <style> block. Classes give us reusable styles, a CSS Grid lays out the cards, and a media query switches to a single column on narrow screens. Resize the preview panel to watch it adapt.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Mai Nguyen — Profile</title>
<style>
body { margin: 0; font-family: system-ui, sans-serif; background: #f5f5f5; color: #222; line-height: 1.5; }
header { background: #e34c26; color: white; text-align: center; padding: 24px 16px; }
header img { border-radius: 50%; border: 3px solid white; }
header h1 { margin: 8px 0 0; }
nav a { color: white; margin: 0 6px; }
main { max-width: 900px; margin: 24px auto; padding: 0 16px;
display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card { background: white; border-radius: 10px; padding: 16px;
box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.wide { grid-column: 1 / -1; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 4px 8px; border-bottom: 1px solid #ddd; }
input, textarea, select { width: 100%; box-sizing: border-box; padding: 6px; }
button { background: #e34c26; color: white; border: 0; padding: 8px 16px; border-radius: 6px; cursor: pointer; }
footer { text-align: center; padding: 16px; color: #666; }
@media (max-width: 600px) { main { grid-template-columns: 1fr; } }
</style>
</head>
<body>
<header>
<img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='50' fill='%23ffb199'/%3E%3Ctext x='50' y='62' font-size='36' text-anchor='middle' fill='%23812b14' font-family='sans-serif'%3EMN%3C/text%3E%3C/svg%3E"
alt="Mai Nguyen's avatar: the initials MN" width="96" height="96">
<h1>Mai Nguyen</h1>
<p>Junior web developer · Ho Chi Minh City</p>
<nav><a href="#about">About</a><a href="#skills">Skills</a><a href="#contact">Contact</a></nav>
</header>
<main>
<section id="about" class="card wide">
<h2>About me</h2>
<p>I build <strong>accessible</strong>, fast websites and I am learning <em>JavaScript</em>.
Outside work I take photos and bake bread.</p>
</section>
<section id="skills" class="card">
<h2>Skills</h2>
<ul>
<li>HTML & semantic markup</li>
<li>CSS layout</li>
<li>Basic JavaScript</li>
<li>Git</li>
</ul>
</section>
<section class="card">
<h2>Experience</h2>
<table>
<thead><tr><th scope="col">Year</th><th scope="col">Role</th></tr></thead>
<tbody>
<tr><td>2025–now</td><td>Junior developer</td></tr>
<tr><td>2024</td><td>Intern</td></tr>
</tbody>
</table>
</section>
<section id="contact" class="card wide">
<h2>Contact</h2>
<form id="f">
<p><label for="n">Name</label><input id="n" required></p>
<p><label for="e">Email</label><input id="e" type="email" required></p>
<p><label for="m">Message</label><textarea id="m" rows="3" required></textarea></p>
<button type="submit">Send</button>
</form>
<p id="ok" hidden>Thanks for your message!</p>
</section>
</main>
<footer>© 2026 Mai Nguyen · Built with plain HTML & CSS</footer>
<script>
document.getElementById('f').addEventListener('submit', function (e) {
e.preventDefault();
this.hidden = true;
document.getElementById('ok').hidden = false;
});
</script>
</body>
</html>Ideas to extend it
- Add a projects section with
<article>cards, each with a small inline SVG thumbnail. - Add a
<figure>with a<figcaption>for a favourite photo. - Add a dark theme using
@media (prefers-color-scheme: dark). - Validate your page with the W3C Markup Validator and fix every warning.
- Check it with only the keyboard: can you reach every link and form field with Tab?
Tip: Save the final version as
index.htmlon your computer and double-click it — it opens in your browser with no server needed. Free hosts like GitHub Pages can publish it to the world.
Test yourself
Why does the project use <section>, <header> and <footer> instead of only <div>s?
- They load faster
- They give the page meaningful structure for browsers, search engines and assistive technology
<div>is deprecated- They add default colours
What does e.preventDefault() do in the form's submit handler?
- Validates the form
- Stops the browser from submitting and reloading, so the script can show a message
- Deletes the input
- Sends the data to a server
Which CSS feature switched the layout to one column on small screens?
- A
<table> - A media query
@media (max-width: 600px) - The
hiddenattribute - The viewport meta tag alone