Mini lesson · English

How to build your first personal website

Turn supplied sample content into a small personal website with a coding assistant, then test it like a visitor.

Start the interactive lessonRead the lesson below

Who is this for?

People making their first website. You choose the content and check the result; a coding assistant can edit the supplied files. No HTML, framework or command-line experience is required.

Before you start

A browser, a folder you can open in a coding assistant and the supplied workshop. You may keep the fictional practice identity while learning; label it clearly. Use only information you choose to make public before sharing your own page. Worked answers are illustrative examples, not completed tests on your account. Replace their sample observations with your own results, or identify the step that is still blocked.

Estimated time: 27–45 min

Estimates for the supplied starter files with prerequisite accounts and tools ready. Setup, deployment queues and delivery/DNS waits take additional time. Local editing estimates. Publishing, buying a domain and writing a complete project case study are separate tasks.

What you will learn

  • Create an introduction, project section and contact route from a supplied starter.
  • Check the page on a phone and by keyboard.
  • Make one focused improvement from an observed problem.

Workshop files

Step 1

Choose what the visitor should learn

Start with one person and three things they need from your page.

Download the supplied starter and open starter/index.html. Alex Morgan and the reading-club project are fictional practice content. Choose a visitor, such as a potential collaborator; ask the assistant to keep that practice status clear while you learn.

The visitor should be able to understand the introduction, find a project and reach the contact section. Keep private details off the page.

A concrete example

A potential collaborator opens Alex Morgan’s supplied page. The introduction says designer and developer; the reading-club card explains a useful project; Contact reaches Get in touch. Those are three specific things to ask a visitor to find.

Open the supplied starter folder. Help me make a simple introduction, two project cards and a Contact section using the supplied fictional practice facts. Keep the fictional label and unconfigured contact clear. Use the existing HTML/CSS rather than adding a framework. Tell me which file to open and help me test Projects, Contact and a phone-sized screen.

MDN: your first website

Files for this step

Start hereWorkshop files

Open or download the files below. When saving a project, keep the folder paths shown in the filenames.

How it works (optional)

Build your first personal website

Your first page should explain who you are, show something you have made and provide a way to contact you.

A personal website is a document that a browser can display. HTML gives it structure, CSS controls its appearance, and the browser turns those files into the page a visitor sees.

Our first version has three sections: introduction, projects and contact. These are a manageable starting point because you can test whether each helps someone complete a real task. Download the files, then read project-brief.txt before editing.

Worked example: a visitor with a reason to stay

A potential collaborator wants to know whether Alex has built anything relevant. “Creative. Passionate. Innovative.” gives little evidence. “I built a reading-club page that shows the next meeting” names something the visitor can understand.

MDN: your first website

Extra implementation exercise

Your visitor is considering a small collaboration. What should they be able to learn or do on the first version of your page?

Show a worked solution

They should understand what you do, find one relevant project and reach a working contact link. Those are the three checks we will repeat after editing.

  • Names the person or role and one concrete project.
  • Includes a usable contact route rather than a decorative button.

Step 2

Open the site and follow its links

Use the browser to inspect the starter before asking for a change.

Give the starter folder to your coding assistant. Ask which file opens the site, then open it and follow Projects and Contact. The assistant can fix a broken destination; you do not need to write link syntax.

A menu link should reach its named section. If it fails, tell the assistant what you clicked and where you expected to arrive, then repeat that same click after the fix.

A concrete example

Projects should reach the reading-club card; Contact should reach Get in touch. The supplied email is alex@example.com. Reaching that section is a navigation check, not evidence that a real person can receive your email.

Files for this step

Start hereWorkshop files

Open or download the files below. When saving a project, keep the folder paths shown in the filenames.

How it works (optional)

Open the files and inspect the structure

Start with the provided page so you can connect a visible element to the HTML that creates it.

Unzip the workshop. Open starter/index.html in your browser, then open the same file in your editor. Keep both windows available. Change the introduction sentence, save, and refresh the browser.

A heading identifies a section. A paragraph explains it. An anchor creates a link. The id on a section gives an internal link a destination; it is not visible text. The supplied page works without JavaScript.

Keep the exact file path visible in your editor and browser. Change one word, save, then refresh that same file. If the word does not change, compare the two paths before changing the HTML. This one-word probe separates an editing mistake from a page-code problem.

Worked example: connect a menu link to a section

The link below moves to the element whose id is projects. The two spellings must agree. A browser cannot infer that work and projects mean the same thing.

<a href="#projects">Projects</a>
<section id="projects">
  <h2>Selected projects</h2>
</section>

Extra implementation exercise

You rename the section id to work but leave the menu link as #projects. What exact change restores the link?

Show a worked solution

Change the menu link to href="#work", or restore the section id to projects. Click the link after saving to verify that it reaches the intended section.

  • Makes the fragment and section id match.
  • Keeps the visible link meaningful.

Step 3

Supply truthful project descriptions

Let the assistant arrange your facts without inventing your history.

Use the provided project facts or write two short sentences about your own work: what you made and what someone can do with it. Ask the assistant to replace only the project copy.

Read the result yourself. Keep a prototype labeled as a prototype, retain the fictional label for sample work and do not invent customers or achievements.

A concrete example

“A simple page that helps neighbours find the next book and meeting” tells us what the supplied reading-club project does. “An innovative experience” would leave the visitor guessing.

Files for this step

Start hereWorkshop files

Open or download the files below. When saving a project, keep the folder paths shown in the filenames.

How it works (optional)

Replace sample text with evidence

Write information a visitor can use, rather than leaving a polished page about a fictional person.

Replace Alex’s name, role, introduction and project. Describe what the project does and who it helps. A student project or a small personal tool is a valid example when described honestly.

Use a link to a real project if you have one. If the project is not public, explain it briefly without inventing a destination. Replace the example email address with an address you are willing to publish. A mailto link opens the visitor’s email application; it is not the inbox-delivery form taught in a later lesson.

Worked example: a concrete project description

“Reading Club: a page that lists our next book, meeting date and venue” is specific. A link called “View the reading-club project” tells a visitor where it goes. “Click here” gives less context.

Extra implementation exercise

Write a two-sentence project description: what did you make, and what can someone do with it?

Show a worked solution

For example: “I made a reading-club page for my neighbourhood. Members can find the next book, meeting date and venue.” Replace this example with your own work rather than claiming Alex’s project.

  • Identifies an actual artifact and its intended user.
  • Describes a capability without inventing achievements or results.

Step 4

Check the page on a phone

Ask for a repair using what you can see, not CSS vocabulary.

Open the page in a narrow browser window, around 390 pixels, or on a phone. Read the whole project title and activate Contact. If text runs beyond the edge, give the assistant a screenshot and ask for a focused repair that keeps all the words.

Repeat at the same width after the change, then open a wide view. For a simple keyboard check, press Tab until a link has a visible outline and press Enter to follow it. Keep both projects and contact available.

A concrete example

At a narrow width, read the complete project title and activate Contact. If a word disappears beyond the edge, show that exact view to the assistant; “make it responsive” gives much less information.

Files for this step

Start hereWorkshop files

Open or download the files below. When saving a project, keep the folder paths shown in the filenames.

How it works (optional)

Make the page readable and usable

Use CSS to support the content, then check the page with a keyboard and a narrow viewport.

The CSS is in starter/style.css. Its maximum width prevents very long lines; padding keeps text away from the edges; the heading size adapts to the screen. Change one property at a time and compare the result.

Use Tab to visit each link and Enter to activate it. The visible focus outline tells a keyboard user where they are. In browser developer tools, try a width near 390 pixels. Text should remain readable, and the page should not require sideways scrolling.

Worked example: flexible type instead of a fixed huge heading

A responsive size lets the heading grow on a desktop while remaining usable on a phone. It does not fix every layout problem, so still test your actual text.

h1 {
  font-size: clamp(36px, 7vw, 68px);
  line-height: 1.1;
}
a:focus-visible { outline: 3px solid #ba5d3e; }

Extra implementation exercise

At 390 pixels wide, your long project title forces sideways scrolling. What will you inspect before reducing every font size?

Show a worked solution

Inspect the element that extends beyond the screen. Remove an unnecessary fixed width or allow the specific long text to wrap. Then check the heading, links and body text again instead of shrinking the whole page.

  • Checks fixed widths, unbreakable text and oversized elements.
  • Keeps readable text and retests the actual narrow layout.

Step 5

Keep the first version small

A usable first page is more valuable than an unnecessary rebuild.

Review the three visitor tasks. Ask the assistant for the smallest remaining change rather than a new framework, account system or animation. Save a copy before a larger change.

Open the saved result again and repeat the task affected by the change. Keep a useful working version you can return to.

A concrete example

A focused request is: “Add a clear practice-project label beside the reading-club card, preserving its text and link.” The check is whether a visitor can find the project and recognize its status.

Astro: content sites · Next.js: getting started

Files for this step

Start hereWorkshop files

Open or download the files below. When saving a project, keep the folder paths shown in the filenames.

How it works (optional)

Choose only the tools this page needs

A working HTML page is a legitimate first website. Add a framework when its features solve a problem you actually have.

This starter needs no package installation or build command. You can keep editing the HTML and CSS directly. That makes the connection between a file and the displayed page easy to follow.

For a growing content site, Astro can provide reusable layouts. Next.js is a different route for a React application with server features. These are alternatives with their own setup, not requirements to finish this exercise. Keep the current folder as a known working version before experimenting.

Worked example: choose by the next task

A one-page portfolio with three sections can stay as HTML and CSS. A site with dozens of articles may benefit from reusable templates. Choose based on the work you need to maintain, not on a tool’s popularity.

Astro: content sites · Next.js: getting started

Extra implementation exercise

You have one page and no application features. Do you need to migrate it to a framework before showing it to someone? Explain your choice.

Show a worked solution

No framework migration is required for this task. Finish and test the current page. Consider a framework later if repeated layouts, content volume or application behavior make it useful.

  • Recognizes that the existing page can satisfy the task.
  • Gives a concrete reason before adding setup or dependencies.

Step 6

Finish a two-project page

Hand over something another person can open and use.

Ask the assistant to add the second supplied or truthful project while preserving navigation and contact. Open the result, then ask someone to find one project and contact, or perform the same task in a fresh browser window.

Check narrow and wide views and keyboard navigation. Record what you actually tried and one improvement; publishing is a separate next lesson.

A concrete example

The supplied comparison adds A community garden diary: volunteers can find planting notes and the next shared task. A complete handoff identifies both cards and the contact placeholder instead of reporting only “the page looks good.”

Files for this step

Start hereWorkshop files

Open or download the files below. When saving a project, keep the folder paths shown in the filenames.

How it works (optional)

Your assignment: make the page yours

Produce a small page that a visitor can understand and navigate without your explanation.

Replace all fictional identity and project text. Add a second project with a distinct description. Keep the introduction, projects and contact destinations working.

Ask someone to find one project and your contact route, or perform the task yourself in a fresh browser window. Record one confusing detail, improve it, and repeat the same check. Publishing is the next lesson; this assignment can be completed locally. After trying it, compare the two-project reference in worked-solution/index.html. Its identity and projects are fictional; your own submission should contain your work.

Worked example: record observable results

A useful note is “The Projects link reached the correct section; the second project link still used an example address.” It names an actual result you can fix, rather than saying that the page feels finished.

The complete reference walkthrough is available in reference/assignment-walkthrough.txt. Compare its steps with your own result; fill the test record from observations in your own project.

Extra implementation exercise

Create your own two-project page and verify its three visitor tasks. What evidence will you submit?

  1. Replace the sample identity, project text and contact address.
  2. Add a second project without breaking internal navigation.
  3. Check keyboard access and a narrow screen; record one improvement.
Show a worked solution

One structural reference uses a library opening-hours page and a photo gallery; these topics are optional and must not be presented as your own history. For a library example: “Neighbours could not find today’s hours. I built a page that puts today’s hours and the address before the gallery.” For your own page, use two truthful project descriptions. A practice or planned item is welcome if clearly labelled.

Replace the example name and email only with information you choose to publish; a dedicated contact alias can be preferable to exposing a personal inbox. Open the final file directly, follow Projects and Contact, then test at 390px with a long project title. The supplied worked-solution files show the complete two-project structure.

  • No fictional placeholders remain; both projects are clearly described.
  • Navigation and contact links work, with readable text and visible keyboard focus.
  • Uses the learner’s own truthful descriptions; practice or planned work is labelled, and sample project claims are not copied as personal history.

Was this lesson useful?

Leave a like, or share it with someone who could use it.

Continue learning

Explore the other lessons