Skip to content
Tutorials Center
My learning

Topics

Lesson 115 of 122 Β· Projects

Project: Personal Profile Page

Build a complete personal profile page with HTML and a little CSS. Add a photo, an introduction, skill lists, quick facts, contact links and a footer, step by step.

It is time to build something real. In this project you will create a personal profile page: the kind of one-page "about me" site that people link from their social profiles, rΓ©sumΓ©s and email signatures. It is small, but it uses a surprising amount of what you have learned: document structure, headings, images, lists, links and a dash of CSS.

You will build the page in six steps. Each step has its own editor, so you can see the page grow, change the text to describe yourself, and experiment freely. The last step puts everything together into one complete, polished page that you can save as index.html and publish.

Our example person is Mira Okafor, a fictional illustrator who is learning web development. Replace her details with your own as you go.

Step 1: The document skeleton

Every page starts with the same skeleton you met in Your First Web Page: a doctype, an <html> element with a lang attribute, a <head> with metadata, and a <body> with the visible content.

Step 1: skeleton

A few decisions are already made here:

  • lang="en" tells browsers, translators and screen readers which language the page is in.
  • The viewport meta tag makes the page display at a sensible size on phones (see Meta Tags).
  • The <title> names the person and what she does, because this is the text that appears in browser tabs and search results. Page Titles and Descriptions explains how to write good ones.

Step 2: Header, photo and introduction

A profile page needs a face. Add a <header> with the name, a photo and a one-line summary, then a <main> element with an "About me" section. Using semantic elements means screen-reader users can jump straight to the main content.

From here on, the steps show only the part inside <body>; the head stays the same.

Step 2: header and introduction

Look at the image attributes. The alt text describes what a sighted visitor would see, width and height reserve space so the page doesn't jump while the picture loads, and the file is an SVG, which stays sharp at any size. You can revisit all of this in Images.

aria-labelledby on the <section> points to the heading's id, giving the section an accessible name. That turns it into a labeled region that assistive technology can list.

Step 3: Skills and quick facts

Next come two lists, each the right kind for its content:

  • Skills have no particular order, so they go in an unordered list (<ul>).
  • Quick facts are name–value pairs (location, languages, availability), which is exactly what a description list (<dl>) is for. See Description Lists.
Step 3: lists

Notice that one <dt> can have several <dd> values, as with the three languages. The <time> element gives the month a machine-readable form; you met it in Times, Data Values and Ruby Text.

A profile page should make it easy to get in touch. You will add:

  • An email link with mailto: (see Email, Phone and Download Links).
  • Links to portfolio and social profiles. These go to other sites, so describe the destination in the link text.
  • A small in-page menu at the top that jumps to each section using fragment links (#about), as explained in Link Targets and Page Jumps.
Step 4: links

Click the menu links in the preview and the page jumps to each section. The email link opens the visitor's mail app with the subject already filled in; the space in the subject is written as %20, as you learned in URL Encoding.

Show the email address as the link text. Some people can't use mailto: links (for example on a shared computer without a mail app). If the address is visible, they can still copy it.

Step 5: Styling with CSS

The HTML is complete and works on its own. Now add a <style> element to the <head> to turn it into something you would be proud to share. If CSS is new to you, read Adding CSS to HTML and Colors first; this step uses only a few simple ideas:

  • Custom properties (--accent) keep the colors in one place.
  • max-width with margin-inline: auto keeps lines short enough to read comfortably.
  • A flex layout lines up the navigation links.
  • border-radius: 50% turns the square photo into a circle.
Step 5: styles

Try changing --accent to another color, such as #7c3aed or #b45309, and watch every heading, link and the photo border change together.

Step 6: The complete page

Here is everything together, plus a footer and a few finishing touches:

  • A footer with a copyright line and a "back to top" link.
  • scroll-behavior: smooth so the in-page links glide instead of jumping (it is switched off for people who ask their system to reduce motion).
  • A focus style so keyboard users can always see which link they are on.
  • A dark color scheme that follows the visitor's system setting with prefers-color-scheme.
Step 6: complete profile page

Switch your operating system or browser to dark mode and run the example again: the colors follow along, because every color comes from a custom property that the media query redefines.

Make it yours

Before you publish, work through this checklist:

  • Replace the name, photo, text and links with your own. Keep the alt text accurate for your photo.
  • Update the <title> and description in the head.
  • Check the heading outline: one <h1>, then <h2> for each section, no skipped levels.
  • Press Tab through the page. Every link should show a visible focus ring.
  • Run the page through the HTML validator (see Validating Your HTML).

Ideas for extra practice: add a "Recent work" section with a few images in figures with captions, a favicon (see Favicons and App Icons), or social sharing tags so your link looks good when posted.

Check your understanding

Quick check Β· 4 questions

of 4 answered You scored / 4 Β· perfect!

  1. 1. Which element best holds "Based in / Lisbon" and "Languages / English, Portuguese" pairs?

    A description list is designed for name–value groups, and one dt can have several dd values.
  2. 2. Why do the image tags include width and height?

    Known dimensions let the browser lay out the page before the file arrives, so content doesn't jump around.
  3. 3. What does <a href="#contact"> do on this page?

    A fragment link scrolls to the element whose id matches the part after the hash.
  4. 4. Why is the visible link text the email address itself, rather than "Email me"?

    Not everyone has a mail app set up. Showing the address gives them another way to get in touch.

Summary

  • Start every page with a complete skeleton: doctype, lang, charset, viewport, a descriptive <title> and meta description.
  • Use <header>, <nav>, <main>, <section> and <footer> to give the page a clear structure.
  • Images need meaningful alt text plus width and height.
  • Pick lists by meaning: <ul> for unordered items, <dl> for name–value facts.
  • Fragment links build an in-page menu; mailto: links make contact easy.
  • A small amount of CSS with custom properties, a readable width and focus styles makes the page polished and accessible.

Next lesson: Project: Blog Article, where you mark up a full article with figures, dates, a table of contents and a sidebar.