12. Mini Project: A Profile Page
Now combine everything you have learned: page skeleton, text, lists, links, layout, box model and flexbox. Read the example, press Run, then change it to be about you. When you are comfortable here you are ready to go back to the MVC notes, where this same HTML and CSS will be placed inside Razor views and layouts.
Key points
- Change the name, text and colours.
- Add a new section with a list of your skills.
- Try making the cards stack on small screens using a media query.
- Next step: return to the MVC notes and continue with Models, Controllers and Views.
Example: Profile page
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Profile</title>
<style>
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, sans-serif; line-height: 1.6; color: #111; }
header { background: black; color: white; padding: 32px 20px; text-align: center; }
main { max-width: 760px; margin: 0 auto; padding: 20px; }
.skills { display: flex; gap: 12px; flex-wrap: wrap; padding: 0; list-style: none; }
.skills li { border: 2px solid black; padding: 8px 14px; border-radius: 4px; }
footer { text-align: center; padding: 16px; border-top: 1px solid #ccc; }
</style>
</head>
<body>
<header>
<h1>Thabo Mokoena</h1>
<p>Aspiring C# developer</p>
</header>
<main>
<h2>About me</h2>
<p>I am learning to build web applications with C# and ASP.NET Core MVC.</p>
<h2>Skills</h2>
<ul class="skills">
<li>HTML</li><li>CSS</li><li>C#</li><li>SQL</li>
</ul>
</main>
<footer>Built with HTML and CSS</footer>
</body>
</html>
Show explanation
This is a complete page using a header, main area, flex-based skill tags and a footer, all styled with CSS.
Try it yourself
Edit the code below and press Run. The result appears in the preview underneath.
PREVIEW