Home首頁  /  Lessons課程  /  Lesson 2第二課

Where Does the HTML Come From?HTML 到底是怎麼來的?

In Lesson 1 you published a website. But who actually writes the HTML? The answer is AI — and there are two very different ways it can help you. The difference becomes obvious the moment your site grows from one page to twenty.

第一課你把網站發佈出去了。但 HTML 到底是誰寫的?答案是 AI——而 AI 幫你的方式有兩種,差別很大。等你的網站從一頁變成二十頁,這個差別就會立刻浮現。

What you'll understand你會明白

  • a Where your HTML actually comes froma 你的 HTML 究竟從哪裡來
  • b Two ways AI works: agent vs non-agentb AI 工作的兩種模式:代理人 vs 非代理人
  • c How to manage a big site — 20 pages, one shared menu of buttonsc 如何管理大網站——20 頁、一個共用的按鈕選單
  • d Which way fits you right nowd 現在的你,適合哪一種
The real challenge真正的難題

It's not one page — it's twenty working together難的不是一頁,而是二十頁要彼此配合

Picture a website with 20 pages and a menu of 4–5 buttons at the top of every page. That's the moment people freeze. One page is easy — the hard part is keeping all 20 in step:想像一個有 20 頁的網站,每一頁最上面都有一排 4~5 個按鈕的選單。很多人就是在這裡卡住。一頁很簡單——難的是讓 20 頁彼此一致:

  • Every page needs the same menu (those 4–5 buttons)每一頁都要有相同的選單(那 4~5 個按鈕)
  • Every page must link to the others correctly每一頁都要正確連到其他頁
  • All pages should share one look (one stylesheet)所有頁面要長得一樣(共用一個樣式檔)
  • All the files must get into GitHub所有檔案都要進到 GitHub

How easily you handle all this depends a lot on which kind of AI you use. There are two.這一切處理起來輕不輕鬆,很大程度取決於你用的是哪一種 AI。共有兩種。

Two ways AI helpsAI 幫你的兩種方式

Agent vs Non-Agent代理人 vs 非代理人

Both write good HTML. The difference is who manages the files — you, or the AI.兩種都能寫出好的 HTML。差別在於誰來管理檔案——是你,還是 AI。

Non-agent非代理人

The chat way對話式

You chat, it hands you code. e.g. Gemini, ChatGPT (free), Claude.ai chat.你聊天,它給你程式碼。例如 Gemini、ChatGPT(免費)、Claude.ai 對話。

What it is這是什麼

The AI writes code inside the chat window. You copy it out, paste it into a file on your computer, and save. The AI never touches your files or GitHub — you do all of that yourself.AI 在對話視窗裡寫程式碼。你把它複製出來、貼進電腦裡的檔案、存檔。AI 不會碰你的檔案或 GitHub——這些都由你自己來。

Your 20-page site你的 20 頁網站

You ask for each page, copy each one into its own .html file, and keep the menu identical across all 20 yourself. Then you upload everything to GitHub the Lesson 1 way.你一頁一頁地問,把每一頁分別複製到自己的 .html 檔,並自己讓 20 頁的選單保持一模一樣。然後用第一課的方法,把全部檔案上傳到 GitHub。

Good & watch out優點與要注意

  • Free, nothing to install, works in any browser免費、不用安裝、任何瀏覽器都能用
  • Perfect for learning and small sites非常適合學習和小型網站
  • You copy-paste every page by hand每一頁都要自己複製貼上
  • Keeping 20 pages consistent is up to you20 頁要一致,全靠你自己顧
Agent-based代理人

The assistant way助理式

It works on your files directly. e.g. Claude Code, OpenAI Codex.它直接動你的檔案。例如 Claude Code、OpenAI Codex。

What it is這是什麼

The AI works right on your computer (or workspace). It can create files and folders, edit many pages at once, and even make your GitHub repo and publish it for you.AI 直接在你的電腦(或工作區)裡運作。它能建立檔案和資料夾、一次編輯很多頁,甚至幫你建立 GitHub repo 並發佈。

Your 20-page site你的 20 頁網站

You describe the site once. It builds all 20 pages with the same menu and one shared style — and can push them to GitHub. Want to change a button? One instruction updates all 20 pages.你只要描述一次。它就把 20 頁都建好,選單相同、共用同一套樣式——還能推上 GitHub。想改一個按鈕?一句話就同時更新 20 頁。

Good & watch out優點與要注意

  • Handles big, multi-page sites with ease輕鬆處理大型、多頁的網站
  • Keeps every page consistent automatically自動讓每一頁保持一致
  • Can manage files and GitHub for you能幫你管理檔案和 GitHub
  • Usually needs setup, and often a paid plan通常要先安裝設定,而且常需付費方案
  • A little more technical to start入門稍微技術一點
Side by side一張表看懂

At a glance快速對照

Non-agent (e.g. Gemini)非代理人(例如 Gemini) Agent (e.g. Claude Code)代理人(例如 Claude Code)
Where the code appears程式碼出現在哪 In the chat — you copy it out在對話裡——你自己複製出來 Directly in your files直接寫進你的檔案
Who creates the files誰建立檔案 You, by hand你,手動 The AIAI
20 pages, same menu20 頁、相同選單 You keep them matching你自己維持一致 Done automatically自動完成
Publishing to GitHub發佈到 GitHub You upload (Lesson 1)你自己上傳(第一課) The AI can publish itAI 可以幫你發佈
Cost費用 Usually free通常免費 Often a paid plan常需付費方案
Best for最適合 Learning, small sites學習、小型網站 Big or growing sites大型或會長大的網站
The mental model管理大網站的訣竅

Four habits that make 20 pages feel simple讓 20 頁變簡單的四個習慣

Whichever AI you use, these four habits keep a big site under control:不管你用哪一種 AI,這四個習慣都能讓大網站好管理:

  1. One shared stylesheet一個共用的樣式檔 Keep a single styles.css. Every page links to it, so all 20 pages share one look. Change it once, and every page updates together.維持單一個 styles.css。每一頁都連到它,所以 20 頁共用同一個外觀。改一次,所有頁面一起更新。
  2. One menu, copied everywhere一個選單,到處共用 Your 4–5 buttons are the same block of code at the top of every page. (An agent does this for you; in chat mode, keep one "master" copy you paste into each page.)你那 4~5 個按鈕,在每一頁頂部都是同一段程式碼。(代理人會幫你做;對話模式下,自己留一份「母版」貼到每一頁。)
  3. Simple, consistent file names簡單、一致的檔名 index.html is always the home page. Use clear lowercase names like about.html, lessons.html. Link between pages using those file names.index.html 永遠是首頁。其他用清楚的小寫檔名,例如 about.htmllessons.html。頁面之間就用這些檔名互相連結。
  4. One folder = your repo一個資料夾 = 你的 repo All your .html files and styles.css live in one folder. That whole folder is exactly what goes to GitHub.你所有的 .html 檔和 styles.css 都放在同一個資料夾。整個資料夾就是要上 GitHub 的東西。
So which one?那我該用哪個?

Start where you're comfortable從你自在的地方開始

If you're starting out with free tools, Gemini (non-agent) is genuinely fine for a few pages — and a great way to learn. As your site grows toward 10–20 pages, or you get tired of keeping everything in sync by hand, an agent like Claude Code saves enormous time. Most teachers start with the chat way and move to an agent when the site gets bigger. There's no wrong choice.如果你剛起步、用的是免費工具,Gemini(非代理人)做幾頁是完全夠的——也是很好的學習方式。等你的網站長到 10~20 頁,或你受不了一頁頁手動同步時,像 Claude Code 這樣的代理人能省下大量時間。多數老師都是先用對話式,等網站變大再轉用代理人。沒有錯的選擇。

Quick recap快速回顧

  • Your HTML is written by AI — you don't type it from scratch你的 HTML 是 AI 寫的——不用從零手打
  • Non-agent (Gemini): code in the chat, you manage the files非代理人(Gemini):程式碼在對話裡,檔案你自己管
  • Agent (Claude Code): it manages files and can publish for you代理人(Claude Code):它管檔案,還能幫你發佈
  • Big sites stay simple: one stylesheet, one menu, clear names, one folder大網站保持簡單:一個樣式檔、一個選單、清楚檔名、一個資料夾
  • Pick the way that fits you today — you can switch later挑現在適合你的方式——之後隨時能換