You reach the last lesson of the course with The Blue Cup complete on your computer: eight content pages, a confirmation page, a booking form connected to a real service, a workshops page built from start to finish and a list of pending items that has been emptying lesson by lesson. The last step of the process is missing, the one that turns a project into a website: publishing it. But publishing isn't copying files to a server. First you have to test the site systematically, because the faults that slip through now will be found by customers; you have to prepare it for production, because there are files that mustn't be published and others that only make sense on a real server; and, afterwards, you have to check that everything works there and maintain it. In this lesson you will do all of that: a final test plan, fixing the last faults, preparing for production (404.html, robots.txt, sitemap.xml, favicon.ico, versioning with ?v=1), choosing static hosting, deploying step by step on Netlify, an introduction to custom domains, DNS and HTTPS, the checks after publishing and a maintenance plan.
Contents
- The final test plan
- Running the tests and fixing the last faults
- Preparing the site for production
- Static hosting options
- Deploying step by step on Netlify
- Custom domain and DNS (in passing)
- HTTPS
- Checks after publishing
- Maintenance
- Project: The Blue Cup on the internet
The final test plan
Throughout the course you have learnt to test each aspect separately: validation in Validating HTML Code, accessibility in Accessibility Testing, performance in Performance and Resource Loading, forms in Submitting Forms and in the previous lesson. A test plan brings them together in a single table with what is tested, how, with what acceptance criterion and at what point. Keep it in notes/plan.md and tick off each row as you complete it.
| No. | Type | What is tested | Tool or method | Acceptance criterion | When |
|---|---|---|---|---|---|
| T1 | Validation | HTML of the 9 pages and 404.html |
Nu Html Checker | Zero errors | Before publishing |
| T2 | Validation | styles.css |
W3C CSS Validator (Jigsaw) | Zero errors (warnings about modern properties are reviewed one by one) | Before publishing |
| T3 | Content | Placeholder leftovers | Global search for [Placeholder], VIDEO_ID, [Text reviewed, CHANGE |
Zero results outside template.html and notes/ |
Before publishing |
| T4 | Links | Internal links, anchors and resources | Manual walk-through + DevTools console (404 errors) before; W3C Link Checker after | No broken links or resources | Before and after |
| T5 | Browsers | Appearance and behaviour | Chrome, Firefox, Edge and Safari, current versions | No differences that prevent the site from being used | Before publishing |
| T6 | Devices | Responsive design | Device mode at 320, 768 and 1280 px; at least one real Android phone and one real iPhone | No horizontal scrolling; everything can be tapped with a finger | Before and after |
| T7 | Accessibility | Automated | Lighthouse and axe on the 9 pages | Zero axe issues; 100 in Lighthouse Accessibility | Before publishing |
| T8 | Accessibility | Manual | Keyboard protocol, NVDA or VoiceOver, zoom at 200% and 400% | The Accessibility Testing checklist passed | Before publishing |
| T9 | Performance | Core Web Vitals | Lighthouse mobile in production | LCP < 2.5 s; CLS < 0.1 | After |
| T10 | Forms | Validation, errors, honeypot field | Manual testing (the checklist from the previous lesson) | All points passed | Before |
| T11 | Forms | Real submission, notification, PRG | Test booking with fictitious data | Reaches the dashboard and the inbox; reloading doesn't resubmit | After |
| T12 | Metadata | Structured data and social preview | Rich Results Test, schema.org validator, Open Graph debuggers | No errors; correct preview | After |
Notice the last column: some tests can only be done after publishing (real performance, form submission, social previews, which need a public URL). That's why the plan has two rounds.
Browsers and devices
You don't need every device in the world, but you do need to cover the rendering engines (Setting Up Your Work Environment): Chromium (Chrome, Edge, Samsung Internet), Gecko (Firefox) and WebKit (Safari, and every browser on the iPhone). WebKit is the one that usually shows the most differences, and it can only really be tested on a Mac or an iPhone. If you have neither, ask someone who does for help: opening the main pages and making a test booking is enough. There are paid services that offer real remote browsers for professional teams.
Running the tests and fixing the last faults
Run the first round (the tests marked "Before") and note down the findings in the same format you used in the reviews in Module 10. This is a plausible table of what you might find:
| No. | Test | Page | Finding | Fix |
|---|---|---|---|---|
| 1 | T4 | index.html |
The opening hours link points to workshops.html#bread-making-workshop, but the id is bread-workshop: the anchor leads nowhere |
Correct the href to #bread-workshop. Check all the links to anchors: a broken anchor doesn't give an error, it simply doesn't scroll |
| 2 | T4 | workshops.html |
In the console, a 404 for img/Latte-Art-Workshop-400.webp: the file was saved with capital letters. It worked on Windows; on the server it would fail |
Rename the file in lowercase (HTML Best Practices) |
| 3 | T3 | workshops.html |
A <!-- The photo will go here --> comment is left over |
Delete it |
| 4 | T5 | bookings.html |
In Safari, the time picker shows a different control and doesn't respect step in the interface |
Acceptable: the value is still validated on submission and the hint explains the format. Noted, not fixed |
| 5 | T8 | workshops.html |
With NVDA, the dates table reads well, but pressing Tab moves focus to the scrolling container on desktop too, where the table doesn't scroll |
Acceptable: it's the behaviour chosen in Media Queries and the container announces its name. Noted |
Look at findings 4 and 5: not every finding is a fault that has to be fixed. Professional testing distinguishes between faults (they're fixed), accepted limitations (they're documented with their justification) and future improvements (they're noted in the plan). What you never do is ignore a finding without making a decision about it.
Fix, rerun the affected tests and, when the first round is clean, update the accessibility audit report (notes/accessibility-audit.md) with the date, the new pages (workshops.html and thanks.html) and their results. That closes pending item P7.
Preparing the site for production
- What is published and what isn't
The project folder contains working tools that mustn't reach the internet: anyone can read what is published (HTML Best Practices).
| Published | Not published | Why not |
|---|---|---|
The 9 .html pages and 404.html |
template.html |
Internal tool (pending item P5); besides, it would be an indexable page full of filler content |
css/, js/, img/, media/ |
.prettierrc, .htmlhintrc |
Editor configuration: of no use to anyone on the server |
robots.txt, sitemap.xml, favicon.ico |
notes/ |
Internal documentation: objectives, audits, contacts |
| Original unoptimised images, test files | Useless weight; possibly data you don't want to publish |
The safest way not to get it wrong is not to publish the working folder, but a clean copy. Outside the-blue-cup/, create a the-blue-cup-site/ folder and copy into it only what's in the first column:
the-blue-cup-site/ ← what is published
├── index.html
├── menu.html
├── workshops.html
├── bookings.html
├── gallery.html
├── news.html
├── contact.html
├── privacy.html
├── thanks.html
├── 404.html
├── robots.txt
├── sitemap.xml
├── favicon.ico
├── css/
├── js/
├── img/
└── media/Every time you publish, delete the contents of the-blue-cup-site/ and copy again: that way, a file you've deleted from the project doesn't survive in the copy. The build tools used by large projects do exactly this automatically (they generate a folder, often called dist/ or public/); for a site of this size, a careful copy using this list is enough.
- Versioning with
?v=1 (pending item P6)
?v=1 (pending item P6)In Performance and Resource Loading you noted that versioning would start with publication. Add ?v=1 to the stylesheet and the scripts on every page (and in the template, for future pages):
<link rel="stylesheet" href="css/styles.css?v=1">
<script src="js/menu-filter.js?v=1" defer></script>From now on, every time you publish a change to styles.css, change ?v=1 to ?v=2 on every page (global search and replace: styles.css?v=1 → styles.css?v=2). The scripts are versioned individually, only when they change.
- The
404.html error page
404.html error pageWhen someone requests a URL that doesn't exist (an old link, a typo when entering the address), the server responds with the 404 code and, if it exists, shows the 404.html page in the root. Both Netlify and GitHub Pages use it automatically. Without it, the person sees a generic hosting page and probably leaves.
Create it from the template, with these differences:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Page not found | The Blue Cup</title>
<meta name="robots" content="noindex">
<link rel="stylesheet" href="/css/styles.css?v=1">
<link rel="icon" href="/img/favicon.svg" type="image/svg+xml">
</head>
<body>
<a class="skip-link" href="#content">Skip to content</a>
<header>
<p class="logo">
<a href="/index.html">
<img src="/img/logo.png" srcset="/img/logo-2x.png 2x" alt="The Blue Cup home page" width="180" height="60">
</a>
</p>
<!-- The template's menu, with every path starting with / -->
</header>
<main id="content">
<h1>We can't find this page</h1>
<p>The link may be out of date or the address may contain a typo. These pages do exist:</p>
<ul>
<li><a href="/menu.html">The menu, with prices and allergens</a></li>
<li><a href="/workshops.html">The bread-making and latte art workshops</a></li>
<li><a href="/bookings.html">Book a table or a workshop place</a></li>
<li><a href="/index.html">The home page</a></li>
</ul>
</main>
<footer>
<!-- The template's footer, with the paths starting with / -->
</footer>
</body>
</html>- Paths from the root (
/css/styles.css,/img/logo.png): it is the only page on the site that uses them, and for a good reason. The 404 page is shown for any non-existent URL, includinghttps://…/workshops/dates/2027. From there, a relative pathcss/styles.csswould resolve to/workshops/dates/css/styles.css, which doesn't exist either: the error page would appear with no styles or logo. With paths from the root, it works from any depth (File Organisation and Paths). For the same reason, with Live Server you'll have to open it from the root of the project. noindex: an error page mustn't appear in search engines.- The
h1says what has happened in plain language, without technical terms ("Error 404"), and the page offers useful ways out: the most sought-after pages. - No canonical URL or Open Graph.
robots.txt
robots.txtThe robots.txt file, in the root of the site, gives instructions to search engine crawlers. For The Blue Cup it's very simple:
User-agent: *: the following rules apply to all crawlers.Allow: /: they can crawl the whole site.Sitemap:: where the sitemap is, with an absolute URL.
Why not block thanks.html and 404.html here with Disallow? Because robots.txt prevents a page from being crawled, not from being indexed: if a search engine finds a link to a blocked page, it may include it in its results without having read it, and precisely because it never reads it, it will never see its meta robots noindex. To keep a page out of the results, the right tool is noindex, which both of them already have. And remember: robots.txt is public and voluntary; it's no use for hiding anything private.
sitemap.xml
sitemap.xmlThe XML sitemap lists the pages you want search engines to know about, with the date they were last modified:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://thebluecup.example/</loc>
<lastmod>2026-12-01</lastmod>
</url>
<url>
<loc>https://thebluecup.example/menu.html</loc>
<lastmod>2026-12-01</lastmod>
</url>
<url>
<loc>https://thebluecup.example/workshops.html</loc>
<lastmod>2026-12-01</lastmod>
</url>
<url>
<loc>https://thebluecup.example/bookings.html</loc>
<lastmod>2026-12-01</lastmod>
</url>
<url>
<loc>https://thebluecup.example/gallery.html</loc>
<lastmod>2026-12-01</lastmod>
</url>
<url>
<loc>https://thebluecup.example/news.html</loc>
<lastmod>2026-12-01</lastmod>
</url>
<url>
<loc>https://thebluecup.example/contact.html</loc>
<lastmod>2026-12-01</lastmod>
</url>
<url>
<loc>https://thebluecup.example/privacy.html</loc>
<lastmod>2026-12-01</lastmod>
</url>
</urlset>- The first line is the XML declaration with the encoding. XML looks like HTML, but it's strict: every tag must be closed and case matters.
urlsetwith its namespace (xmlns) is the root element the format requires.- One
urlper page, withloc(absolute URL, the same as each page's canonical URL) andlastmod(date inYYYY-MM-DDformat). - The eight content pages, and only those: neither
thanks.htmlnor404.html(they havenoindex), nortemplate.html(it isn't published). - The home page appears as
https://thebluecup.example/, as in its canonical URL. - Maintenance: when you change a page, update its
lastmod. A date that never changes, or that always changes, stops being useful to search engines.
favicon.ico
favicon.icoIn Metadata you linked the SVG and PNG icons from the head. However, many browsers, feed readers and other tools request the /favicon.ico file in the root of their own accord, without looking at the HTML; if it doesn't exist, every visit generates a 404 error in the server logs. Generate a 32 × 32-pixel favicon.ico from img/favicon.png (with any icon converter or image editor) and place it in the root of the site. There's no need to link it: it just has to exist.
- Absolute URLs and the domain
The canonical URLs, Open Graph, the structured data, robots.txt and sitemap.xml use https://thebluecup.example. The .example domain is reserved for examples and can never be registered: it's the one this course uses so as not to point to anyone's website. On a real project, these URLs must point to the final domain before publishing. Search for thebluecup.example across the whole project and check that every occurrence is somewhere you'll have to update: absolute metadata URLs and the email address. If you don't have a domain of your own yet, publish first at the hosting's free address (you'll see which one during deployment) and update the URLs as soon as you set up the domain.
- The blocking pending items
Before copying anything, review the list of pending items. One of them may prevent publication:
- P2 and the forms' data protection text: if the professional hasn't delivered the text yet, don't publish the forms. Publish the site with the forms temporarily replaced by a paragraph with the phone number and email address ("For now, book by calling us on…"), and add them in a second publication. A site without a form for a few days is better than a form that breaks the law.
Static hosting options
A site like The Blue Cup (HTML, CSS, JavaScript and media, with no program on the server) is a static site, and it can be hosted on specialised services that are fast and, for small sites, often free. Each service's terms change over time: always check the current ones.
| Option | How you publish | HTTPS | Custom domain | Forms | Ideal for | Bear in mind |
|---|---|---|---|---|---|---|
| GitHub Pages | From a GitHub repository: every change pushed with Git is published | Automatic | Yes | No (external service) | Personal projects, documentation, portfolios | Requires using Git and GitHub; check its terms for commercial sites; whatever is in the repository gets published (watch out for notes/) |
| Netlify | By dragging the folder onto the dashboard, or by connecting a repository | Automatic | Yes | Yes (Netlify Forms) | Small business static sites; starting without Git | Free plan with limits on traffic and form submissions |
| Cloudflare Pages | By connecting a repository or uploading the folder | Automatic | Yes, tightly integrated if the domain uses Cloudflare | No (external service or its own functions) | High-traffic sites; people who already use Cloudflare | A dashboard with lots of options; some features require extra knowledge |
| Traditional hosting | By uploading files over SFTP with a program such as FileZilla | Depends on the provider (almost all include it today) | Yes, usually included | With your own program (PHP) or an external service | People who already have hosting with email and a domain | Use SFTP, never unencrypted FTP (the password would travel in plain text); you set up caching and compression yourself |
For The Blue Cup, the decision was already made in the previous lesson: Netlify, because it hosts the site and processes the forms with a single provider, and because it lets you publish by dragging a folder, without needing to learn Git first.
Deploying step by step on Netlify
The exact names of the buttons and menus in the dashboard change from time to time; if something doesn't match, look for the equivalent option in the Netlify documentation. The process is always the same:
graph LR
A["1. Create the account"] --> B["2. Manual deploy:<br/>drag the folder"]
B --> C["3. Site name"]
C --> D["4. Form detection<br/>and notifications"]
D --> E["5. Deploy again"]
E --> F["6. Check"]
- Create an account on Netlify (the person in charge of the business, or you with their authorisation: the account must belong to the business, not to whoever builds the website). That person manages the password and the email verification.
- Manual deploy. In the dashboard, choose to create a new site and the Deploy manually option. An area appears for dropping files. Drag the whole
the-blue-cup-site/folder (not the working one). In a few seconds, Netlify publishes the site at an address such ashttps://random-name-123.netlify.app. - Change the site name in its settings, so that the free address is recognisable, for example
https://the-blue-cup.netlify.app(if it's available). - Forms. In the site's forms section, enable form detection. Then set up an email notification to
[email protected]for each new submission. - Deploy again. Form detection happens when the HTML is processed during a deployment, so, after enabling it, drag the folder again into the site's deploys section. The forms section should then show
bookingsandcontact(andnewsletter, if you kept it). - Check the public address from your mobile and your computer: it's time for the second round of tests.
Two features of Netlify that are worth knowing about:
- Each deployment is atomic: the new site replaces the previous one in one go, once it's complete. Nobody sees a half-uploaded site.
- Each deployment is kept: in the list of deploys you can republish an earlier one with a click if the latest one has an error. It's your safety net.
Later on, with Git. When you learn Git, you'll be able to connect the site to a repository: every change you push will be published automatically (continuous deployment). At that point it's a good idea for the repository to contain only what can be published, or to configure which folder is published. To begin with, dragging the folder is perfectly professional.
Custom domain and DNS (in passing)
The the-blue-cup.netlify.app address works, but a business needs its own domain (for example, thebluecup.com). The process, broadly speaking:
- Register the domain with a registrar (a company authorised to sell domains). It is paid for annually and registered in the name of the business.
- Add the domain in the site's domain settings on Netlify. Netlify will tell you exactly which records need to be created.
- Configure the DNS. The DNS (Domain Name System) is the internet's "phone book": it translates a name like
thebluecup.cominto the address of the server that hosts it. It is configured with records, in the registrar's or DNS service's dashboard:
| Record | What it's for | Typical example |
|---|---|---|
A or ALIAS |
Points the root domain (thebluecup.com) to an IP address or another name |
The value the hosting gives you |
CNAME |
Points a subdomain (www.thebluecup.com) to another name |
the-blue-cup.netlify.app |
MX |
States which server receives the domain's email | The email provider's ones: don't touch them when setting up the website |
- Wait for propagation: DNS changes can take anything from minutes to a few hours to be visible around the world.
- Update the site's absolute URLs (canonical URLs, Open Graph, JSON-LD,
robots.txt,sitemap.xml) to the new domain and deploy again.
A decision that has to be made: will the main address be thebluecup.com or www.thebluecup.com? Both work; what matters is choosing one, having the other redirect to it (hosting services do this automatically) and always using the chosen one in the canonical URLs.
HTTPS
HTTPS encrypts the communication between the browser and the server: nobody in between (on a public Wi-Fi network, for example) can read or alter what is sent. Today it's mandatory in practice: browsers mark any page with forms served over HTTP as "not secure", several modern features only work with HTTPS and search engines take it into account. What's more, The Blue Cup sends personal data in its form: without encryption, that would be unacceptable.
- The certificate: HTTPS needs a certificate that proves the server is who it says it is. Netlify, GitHub Pages and Cloudflare Pages obtain and renew it automatically (with free certificate authorities such as Let's Encrypt), both for their free address and for your custom domain once the DNS is set up.
- Forcing HTTPS: enable the option that redirects any visit over
http://tohttps://(on Netlify it's usually enabled by default). - Mixed content: an HTTPS page that loads a resource over
http://triggers browser warnings or blocks. It doesn't happen at The Blue Cup: our own resources use relative paths and the external ones (YouTube, OpenStreetMap) already usedhttps://. Check it in the DevTools console: no mixed content warning should appear.
Checks after publishing
With the site on the internet, run the second round of the test plan:
| Check | Tool | What to look at |
|---|---|---|
| Structured data | Google's Rich Results Test and the schema.org validator, with the public URL | workshops.html: two Event items without errors; index.html: the business without errors |
| Preview when shared | The social networks' Open Graph debuggers (for example, Facebook's Sharing Debugger for developers or LinkedIn's Post Inspector) | workshops.html shows the workshops image, its title and its description. If you change the image, these tools let you have the page read again |
| Real performance | Lighthouse in mobile mode and an incognito window, on the public URL | LCP < 2.5 s and CLS < 0.1 on the main pages. Compare with the local measurements: now there is compression and a real network |
| Compression and caching | DevTools Network tab | A content-encoding: br or gzip header on HTML, CSS and JS; cache-control in the responses |
| Error page | Visit a made-up URL, such as /workshops/does-not-exist |
404.html appears with styles and logo |
| Root files | Visit /robots.txt, /sitemap.xml and /favicon.ico |
They display correctly |
| Files that shouldn't be there | Visit /template.html, /notes/plan.md, /.prettierrc |
All three return the 404 page |
| Links | W3C Link Checker with the home page URL, in recursive mode | No broken links |
| Form | Test booking with fictitious data (the tests pending from the previous lesson) | It reaches the dashboard and the café's inbox; it redirects to thanks.html; reloading doesn't resubmit; a submission with the honeypot field filled in doesn't arrive |
| HTTPS | Visit with http:// |
It redirects to https://; padlock with no warnings |
Optionally, register the site with the main search engines' webmaster tools (such as Google Search Console), where you can submit sitemap.xml and see whether there are any crawl errors. It requires proving that the domain is yours, usually with a DNS record.
When everything is green, delete the test booking from the forms dashboard: even though its data is fictitious, the dashboard should contain only real bookings.
Maintenance
A published site isn't finished: it's alive. Without maintenance, within a few months it will have past dates, broken links and the wrong year in the footer. The work always repeats the same cycle:
graph LR
A["Change in<br/>the-blue-cup/"] --> B["Test locally<br/>(validator, keyboard)"]
B --> C["Update ?v=,<br/>lastmod, notes"]
C --> D["Copy to<br/>the-blue-cup-site/"]
D --> E["Deploy"]
E --> F["Check<br/>in production"]
F -. "next change" .-> A
The Blue Cup's periodic tasks, for notes/plan.md:
| Frequency | Task |
|---|---|
| Every month | After each workshop, delete its row from the dates table and update its Event to the next session; review the bookings received against objectives O1–O3 |
| Every quarter | Publish the new workshop dates; update the form's min and max; review the menu prices; run Lighthouse on the main pages |
| With every CSS or JS change | Increment ?v= on every page that links to it |
| With every content change | Update the page's lastmod in sitemap.xml |
| Every year | Change the year of the © in the footer; repeat the full accessibility audit; ask the professional to review the privacy policy; check the external links (other people's websites change or disappear); renew the domain |
| Always | Keep a backup of the project (ideally, with Git and a remote repository) |
And, every now and then, go back to the beginning of the process: are the SMART objectives being met? If bookings for the latte art workshop aren't coming in, perhaps the page needs a different photo, different text or a more visible link from the home page. The site improves with data, not with assumptions.
Project: The Blue Cup on the internet
- Publication steps
- First round of tests (T1–T8, T10) run; findings fixed or documented; accessibility report updated (P7 closed).
- New files in the project:
404.html,robots.txt,sitemap.xmlandfavicon.ico. ?v=1on the stylesheet and the scripts of every page and of the template (P6 closed).- Blocking pending items reviewed: data protection texts received (or forms temporarily removed).
- Clean copy in
the-blue-cup-site/, withouttemplate.html,notes/,.prettierrcor.htmlhintrc(P5 closed). - Deployment on Netlify, form detection, email notification and second deployment.
- Second round of tests (T4, T6, T9, T11, T12 and the table of checks after publishing).
- Maintenance plan in
notes/plan.md.
- The inherited pending items, closed
| No. | Pending item | Final status |
|---|---|---|
| P1 | Interview video identifier | Closed in Adding Content and Media |
| P2 | Reviewed privacy policy | Closed when the professional's text is integrated (blocking for publishing the forms) |
| P3 | Forms connected to a real service | Closed in Integrating the Booking Form and tested in production |
| P4 | Final styles for the form | Closed in Integrating the Booking Form |
| P5 | Don't publish internal tools | Closed with the the-blue-cup-site/ folder and checked in production |
| P6 | ?v= versioning |
Closed: ?v=1 on every page |
| P7 | Updated accessibility audit | Closed in this lesson |
| P8 | Form dates | Turned into a quarterly maintenance task |
- Final state of the project
| File or folder | Final content |
|---|---|
index.html |
Home page: welcome, bakery (with a link to the workshops), offer, bookings card, opening hours by service, reviews; the business's JSON-LD |
menu.html |
Price list and lunch menu in accessible tables, gluten-free filter, filter coffee, glossary, downloadable PDF |
workshops.html |
New page: bread-making and latte art workshop cards, dates table, responsive photos, video with captions, two Event items |
bookings.html |
Final form connected to Netlify Forms, with error states, honeypot field and conditions dialog |
thanks.html |
Confirmation after submission (PRG), noindex |
gallery.html |
Storefront with art direction, responsive products, video and ambient sound |
news.html |
News in article, audio interview with transcript, interview video, canvas chart |
contact.html |
Frequently asked questions, map, connected contact form |
privacy.html |
Privacy policy reviewed by a professional |
404.html, robots.txt, sitemap.xml, favicon.ico |
Production files |
css/styles.css |
A single mobile-first stylesheet with variables, components and form states |
js/ |
menu-filter.js, chart.js, conditions.js, linked with defer and ?v=1 |
img/, media/ |
AVIF/WebP images in several sizes, icons, videos with captions, audio |
template.html, notes/, .prettierrc, .htmlhintrc |
Working tools: in the project, never on the server |
Common Mistakes and Tips
- Publishing the working folder.
template.html, the notes or the editor configuration end up on the internet. Always publish a clean copy. - Testing only in your own browser. Safari on the iPhone is the one that springs the most surprises; test it on a real device.
- File names with capital letters. They work on your computer and fail on the server. The DevTools console shows the 404s: check it on every page.
- Relative paths in
404.html. The error page appears without styles as soon as the URL contains a folder. Use paths from the root on that page only. - Blocking with
robots.txtwhat you don't want indexed. That's whatnoindexis for. And never put "secret" paths inrobots.txt: it's a public file. - Forgetting
?v=after changing the CSS. Regular visitors will see the old design for days. - Using unencrypted FTP on traditional hosting. Use SFTP.
- Touching the
MXrecords when setting up the domain: the business's email would stop arriving. - Considering the site finished on the day of publication. Without maintenance, within a few months it will have past dates and broken links.
- Tip: publish on a quiet day and first thing in the morning, never just before a weekend or an event. If something goes wrong, you need time to fix it (or to go back to the previous deployment).
Exercises
Exercise 1. After publishing, Lighthouse gives gallery.html an LCP of 3.4 s in production, worse than the 2.1 s you measured locally. In the Network tab you see that storefront-1600.avif takes 2.5 s to download and has no content-encoding header. Is the lack of compression the cause? What would you investigate and what would you do?
Exercise 2. Write The Blue Cup's sitemap.xml and robots.txt assuming that the final domain is https://www.thebluecup.com and that, three weeks after publication, an orders.html page has been added (modified on 22 December 2026) and the menu has been changed (on 20 December 2026). The rest of the pages haven't changed since 1 December.
Exercise 3 (your own project). Publish your own project. Write its test plan (at least eight rows, separating the tests before and after publishing), prepare its 404.html, robots.txt and sitemap.xml, choose a hosting option and justify it with the table from the lesson, publish it and run the checks after publishing. Finish with a maintenance table adapted to your business.
Solutions
Solution 1. No: AVIF images are already compressed, and it's normal for them not to have content-encoding (compressing them again saves nothing, as you saw in Performance and Resource Loading). What needs investigating:
- Why is the 1600-pixel version being downloaded on a mobile? Check the
srcsetand themediaof the storefront'ssourceelements: if the condition that choosesstorefront-1600is too broad, a high-density mobile may be choosing it. Test in device mode which file is downloaded at 375 px. - Is the file too heavy? If
storefront-1600.avifweighs, say, 600 KB, export it again with more compression: in AVIF, a photo of that size can come down to 150–250 KB with no visible loss. - Does it still have
fetchpriority="high"? Check it in the published code: a mistake when copying the folder could have uploaded an old version. - Is it the network used for the measurement? Lighthouse simulates a slow mobile network; the difference from local is to be expected. Repeat the measurement three times and take the median.
After fixing it, deploy and measure again. There's no need to change ?v=: neither the CSS nor the JavaScript has changed, only an image (which, as it now has different content under the same name, should be renamed, or you should wait for its cache to expire).
Solution 2.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>https://www.thebluecup.com/</loc><lastmod>2026-12-22</lastmod></url>
<url><loc>https://www.thebluecup.com/menu.html</loc><lastmod>2026-12-22</lastmod></url>
<url><loc>https://www.thebluecup.com/workshops.html</loc><lastmod>2026-12-22</lastmod></url>
<url><loc>https://www.thebluecup.com/orders.html</loc><lastmod>2026-12-22</lastmod></url>
<url><loc>https://www.thebluecup.com/bookings.html</loc><lastmod>2026-12-22</lastmod></url>
<url><loc>https://www.thebluecup.com/gallery.html</loc><lastmod>2026-12-22</lastmod></url>
<url><loc>https://www.thebluecup.com/news.html</loc><lastmod>2026-12-22</lastmod></url>
<url><loc>https://www.thebluecup.com/contact.html</loc><lastmod>2026-12-22</lastmod></url>
<url><loc>https://www.thebluecup.com/privacy.html</loc><lastmod>2026-12-22</lastmod></url>
</urlset>Notice the catch: the question says the other pages "haven't changed", but when you added orders.html to the menu (as in exercise 3 of HTML Best Practices) you changed the HTML of every page that has it, privacy.html included. Its lastmod becomes the date of that change, 22 December; the menu page, modified on the 20th, also received the new navigation menu on the 22nd. If the new page hadn't been added to the menu, only orders.html would have 2026-12-22, menu.html would have 2026-12-20 and the rest would keep 2026-12-01. Also, all the URLs use the final domain with www, just like the canonical URLs.
Solution 3. Open answer. Check that:
- The test plan covers validation, links, browsers from all three engines, devices, automated and manual accessibility, performance in production and forms.
404.htmluses paths from the root andnoindex, and offers useful ways out.sitemap.xmlincludes only the indexable pages, with absolute URLs identical to their canonical URLs.- The published copy contains no templates, notes or editor configuration (check by visiting their URLs).
- The site is served over HTTPS with no mixed content warnings.
- The maintenance table has concrete tasks, with a frequency and someone responsible.
Conclusion
With this lesson the project process comes to an end, and so does the course. You have learnt to test a site systematically with a two-round test plan, to distinguish between faults, accepted limitations and future improvements, and to prepare a site for production: a clean copy without internal tools, versioning with ?v=1, a 404.html page with paths from the root, robots.txt, sitemap.xml and favicon.ico. You have compared static hosting options, published The Blue Cup on Netlify by dragging a folder, seen how a custom domain is connected through DNS and why HTTPS is essential, checked the site in production with the structured data and Open Graph tools, Lighthouse and the link checker, and left a maintenance plan so that it stays alive. Look back at the whole journey. In Module 1 you discovered what HTML is, set up your environment and wrote your first page; in Module 2 you shaped text with headings, paragraphs, lists and quotations; in Module 3 you joined pages together with links and brought them to life with images, video and audio; in Module 4 you turned the menu into accessible data tables; in Module 5 you built forms that validate and submit; in Module 6 you gave each part of the page the semantic element that describes its meaning; in Module 7 you mastered entities, iframe, data attributes, metadata, structured data, SVG and canvas; in Module 8 you connected HTML and CSS and created layouts with Flexbox and Grid; in Module 9 you made everything adapt from a mobile phone to the widest monitor; in Module 10 you reviewed the site with a professional eye so that it was valid, accessible and fast; and in this last module you have gone through the complete process of a web project, from SMART objectives to a site published with HTTPS. The Blue Cup started out as an h1 and three paragraphs in an empty file; today it's a real website, built properly, and you know how to build another one from scratch. From here, the natural path is to go deeper into CSS (the cascade, advanced layout with Grid, animations, stylesheet architecture; the portal has a dedicated course), to learn JavaScript to give your pages behaviour and to handle forms and errors in your own way, to go further in accessibility with the full WCAG and accessible component patterns, to make Git part of the way you work and, once you've mastered that foundation, to explore static site generators and JavaScript frameworks, which automate what you have done by hand here. All of them build on what you already know: semantic, accessible, well-structured HTML is the foundation of any website, and that foundation is now yours.
HTML Course
Module 1: Introduction to HTML
- What Is HTML?
- Setting Up Your Work Environment
- Basic Structure of an HTML Document
- Tags, Elements and Attributes
- Creating Your First HTML Page
- File Organisation and Paths
Module 2: Text Formatting in HTML
- Headings and Paragraphs
- Text Formatting Tags
- Lists: Ordered, Unordered and Description Lists
- Block Quotes and Preformatted Text
- Block and Inline Elements: div and span
Module 3: Links and Media in HTML
- Creating Hyperlinks
- Special Links: Anchors, Email, Phone and Downloads
- Adding Images
- Embedding Videos
- Using the Audio Element
Module 4: Tables in HTML
- Basic Table Structure
- Table Head, Body and Foot
- Merging Cells: colspan and rowspan
- Accessible Tables: caption, scope and headers
- Styling Tables
Module 5: Forms in HTML
- Creating a Basic Form
- Form Elements: input, textarea and select
- HTML5 Input Types
- Labels and Grouping: label, fieldset, legend and datalist
- Form Attributes and Validation
- Submitting Forms
Module 6: HTML5 Semantic Elements
- Introduction to Semantic HTML
- header, nav and footer
- article, section and aside
- main and figure
- Other Semantic Elements: time, address, details and dialog
Module 7: Advanced HTML Techniques
- HTML Entities
- Using iframes
- Data Attributes
- Metadata: meta, SEO and Open Graph
- Microdata and Structured Data
- Graphics in HTML: SVG and canvas
Module 8: Integrating HTML and CSS
- Linking CSS to HTML
- Inline, Internal and External CSS
- Basic CSS Selectors
- The Box Model
- Styling HTML Elements
- Introduction to Layout with Flexbox and Grid
Module 9: Responsive Web Design
Module 10: Best Practices and Accessibility
- HTML Best Practices
- Validating HTML Code
- Web Accessibility Basics
- Using ARIA Roles and Attributes
- Accessibility Testing
- Performance and Resource Loading
