Building a Simple Portfolio Website
A portfolio website is one of the most valuable things you can build as a developer or designer. It's your personal corner of the web: a place where you show employers and clients who you are, what you do, and what you've made. Best of all, you can build a great one using just HTML and CSS.
The Anatomy of a Portfolio
A typical portfolio site is made up of the following sections, ideally all living on a single scrollable page:
- Sticky Navigation: A
navbar fixed to the top of the screen with links that jump to each section. Keeps the user oriented at all times. - Hero Section: A large, attention-grabbing introduction with your name, a one-line summary of what you do, and a call-to-action (CTA) button pointing to your work.
- Skills Grid: A simple grid of "chip" elements highlighting your core competencies. Use
repeat(auto-fit, minmax(...))from CSS Grid so it automatically adjusts to any screen size. - Projects Grid: Cards that each represent a completed project. Each card should include a visual, a title, and a brief description.
- Contact Section: A bold, high-contrast call-to-action at the bottom with your email address or a link to your contact form.
The HTML Skeleton
Because all sections share a single scrollable page, the HTML structure is a sequence of semantic landmark tags inside the body:
Sticky Navigation
By giving the nav a position: sticky and top: 0, it automatically stays glued to the top of the browser window as the user scrolls. You can then use anchor links (<a href="#skills">) to jump to other sections on the page by matching the href to the id of the target section.
Full Working Example
Below is a complete, fully styled portfolio page for a fictional developer. Note how the navigation, hero gradient, skills chips, project cards, and contact section all combine to form a professional, job-ready presentation. Resize the window to see it adapt to mobile screens: