Book 3 — HTML, CSS Basics

Python for All

Chapter Eight — The Article Page

Thanasis Troboukis  ·  All Books

Book Three · Chapter Eight

The Article Page

This is your final project. Everything you have learned — HTML structure, CSS typography, images, links, blockquotes, embeds — comes together into a single, complete, publishable article page. Replace the placeholder content with your own story.

What You Will Build

By the end of this chapter, you will have a complete HTML article page — the kind that any news publication could host. It will include every element a professional online article contains:

The playground below contains a fully working article template. Your job is to replace every piece of placeholder content with your own real or imaginary story. Use any topic you like — local news, environment, politics, culture, technology.

Tip: Work section by section. Replace the headline first and run it. Then replace the body text. Then swap the image. Build confidence before tackling the embed. There is no time pressure — this editor saves nothing, so keep a copy of your HTML in a text file as you work.

The Template — Edit Everything

HTML · Your article — replace all placeholder content

HTML

CSS

Live Preview

Final Checklist

Before you consider your article page complete, go through this list:

Congratulations. You have completed Book 3 — HTML, CSS Basics. You now know how to build a complete, structured, styled article page from scratch — the same building blocks used by every major news website in the world. The next step is to save your HTML as a .html file and open it in a browser, or publish it using a free service like GitHub Pages.

Working Locally — VS Code & Live Server

The playground is great for learning, but your real workflow as a journalist-developer will be to write HTML in a proper code editor on your own computer. The industry standard, free editor is Visual Studio Code (VS Code). Pair it with the Live Server extension and your browser will refresh automatically every time you save a file — just like this playground, but for files you actually own.

Step 1 — Download and install VS Code

Go to code.visualstudio.com and click the download button for your operating system.

Step 2 — Install the Live Server extension

Extensions add features to VS Code. You need two minutes to install Live Server:

  1. Open VS Code.
  2. Press Cmd + Shift + X (Mac) or Ctrl + Shift + X (Windows) to open the Extensions panel.
  3. Search for Live Server.
  4. Find the one by Ritwick Dey — it has several million installs — and click Install.

Step 3 — Open your article in VS Code

  1. Click Download in the playground above to get your my-article.zip.
  2. Unzip it — you will find index.html and style.css inside a folder.
  3. In VS Code, go to File → Open Folder and open the unzipped folder. Always open the whole folder, not just a single file — this is important for Live Server to work correctly and for the CSS file to link properly.

Step 4 — Preview with Live Server

  1. In the VS Code file explorer (left panel), right-click index.html.
  2. Select "Open with Live Server".
  3. Your default browser opens the page at http://127.0.0.1:5500.
  4. Now edit and save the file — the browser refreshes automatically every time you press Cmd + S (Mac) or Ctrl + S (Windows).
Two more extensions worth installing while you are there:
  • Prettier (by Prettier) — automatically formats and indents your HTML and CSS on save, so your code always looks clean.
  • HTML CSS Support (by ecmel) — autocompletes class names as you type, which speeds up styling significantly.

Publishing online for free

Once your article is saved locally, you can share it with anyone. Two free options require no server knowledge:

Setting up GitHub Pages — step by step

What is GitHub? GitHub is a platform where you can store files online — code, HTML, CSS, and anything else. Think of it as Google Drive, but designed specifically for web projects. Each project lives in a repository, which is just a folder on GitHub's servers.

What is GitHub Pages? It is a feature built into GitHub that takes the HTML files in a repository and turns them into a live website with a real public URL. You do not need to buy hosting or configure a server — GitHub handles all of that for free.

Why must the file be called index.html? When a browser visits a URL like https://yourusername.github.io/my-article, it does not know which file to show unless you tell it. Web servers are configured to look for a file called index.html by default and display it automatically. If your file is called article.html or anything else, the browser will show a blank error page instead. The Download button above already names the file index.html for you — do not rename it.

How does the repository name affect the URL? The name you give your repository becomes part of the web address. If your GitHub username is mariap and you create a repository named my-article, your page will be published at https://mariap.github.io/my-article. Choose the name carefully — it will be visible in the URL you share with editors and readers.

  1. Create a free account at github.com. Use a professional username — it will appear in the URL of everything you publish.
  2. Create a new repository. Click the + icon in the top-right corner and choose "New repository". Give it a short, descriptive name — for example housing-report or my-articles. Set the visibility to Public (required for GitHub Pages on a free account), then click "Create repository".
  3. Upload your files. On the repository page, click "Add file" → "Upload files". Drag and drop index.html and style.css from your folder onto the upload area. Once they appear in the list, scroll down and click "Commit changes". Your files are now stored on GitHub.
  4. Turn on GitHub Pages. Go to the Settings tab of your repository. In the left sidebar, click Pages. Under Source, select "Deploy from a branch". Set the branch to main and the folder to / (root). Click Save.
  5. Wait one to two minutes, then refresh the Settings → Pages page. A banner will appear with your live URL — something like https://yourusername.github.io/housing-report. Click it to see your published article in the browser, exactly as any reader would.
Updating your article: go back to your repository on github.com, click index.html, then click the pencil icon (Edit this file) to make changes directly in the browser. Click "Commit changes" when done. GitHub Pages will republish automatically within a minute or two. Alternatively, you can upload a new version of the file using "Add file → Upload files" and it will overwrite the old one.
You are ready. HTML and CSS are not just technical skills — they are editorial tools. The ability to write, preview, and publish your own story without relying on a CMS gives you a form of independence that matters in journalism.

Chapter Navigation

You have reached the end of Book 3.