Honey AI
HONEYSCRIPT HTML+ .HNY / .HTMP · UNDERLISTED X
FREE OFFICIAL BEGINNER'S BOOK · 14 CHAPTERS · HTML5 + CSS3 + HTML+ v2.2

Zero to Web Developer: HTML, CSS & HTML+

Start from absolute zero with real, standard HTML5 and CSS3 (box model, Flexbox, CSS Grid, responsive mobile design), then seamlessly extend those exact same skills with HTML+ to build zero-JS web apps, embedded <db> forms, Gmail emails, and standalone apps.

Jump to Chapter (14 Chapters + Cheat Sheet)

Preface: Welcome to the Web (No Math Genius Required)

If you have never written a single line of code in your life, you are in the exact right place.

A lot of beginners give up on web development in their first week — not because they aren't smart, but because most tutorials throw 12 tools at you on Day 1: HTML, CSS, JavaScript, Node.js, npm, React, TypeScript, Vite, Tailwind, SQL, and Docker.

This book takes a calmer, smarter path:

  1. First (Parts I & II): You will learn real, standard HTML5 and CSS3 from absolute zero. Everything in Parts I and II is 100% universal web knowledge that works in every browser on Earth.
  2. Next (Part III): Once you are comfortable with HTML and CSS, you will see how HTML+ (HoneyScript) extends those exact same skills into interactive apps, databases, forms, and tests — without ever needing JavaScript or 500 npm packages.
  3. Finally (Part IV): You will ship one clean file as a live zero-JS web app, a static website, a Gmail/Outlook HTML email, and even a standalone .exe program.

"Don't break the internet or workflows. Extend it."

Take your time, type the examples out yourself in HoneyScript Sandbox or any text editor, and enjoy watching your own pages come to life.

Chapter 1: How the Internet & Web Pages Actually Work

Before writing code, let's demystify what actually happens when you visit a website.

The Restaurant Analogy

Think of the web like ordering at a restaurant:

  • Your Browser (Chrome, Safari, Firefox) is you sitting at the table.
  • A URL (like https://underlisted-x.com/honeyscript/) is the restaurant's address and table order.
  • A Server is the kitchen — a computer sitting somewhere in the world that stores the website's files and hands them back when asked.
  • HTML & CSS Files are the meal the kitchen sends to your browser so it knows what to show on your screen.

A Webpage Is Just a Plain Text File

There is no magic binary mystery behind a website. A webpage is literally a plain text file (like a .txt note), saved with a .html extension (for standard web pages) or .htmp / .hny (for HTML+ apps).

Here is a complete, valid webpage:

HTML
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>My First Website</title>
</head>
<body>
  <h1>Hello, Internet!</h1>
  <p>I built this page from scratch.</p>
</body>
</html>

Look at the two main sections inside <html>:

  • <head> (Behind the Scenes): Information about the page — its browser tab <title>, character encoding (utf-8 so emojis and accents work), and stylesheets. Visitors don't see <head> directly on the page.
  • <body> (What Visitors See): Every heading, paragraph, image, button, and form visible on the screen lives inside <body>.

Try It Yourself: Create a file on your computer called hello.html, paste the code above, and double-click it. Your browser will open your very own webpage offline!

Chapter 2: HTML Is Just Labeled Boxes

HTML stands for HyperText Markup Language. Forget the scary acronym — HTML is just labeled boxes.

Every box has an opening tag (<p>) and a closing tag (</p>), with your content inside:

HTML
<h1>Main Page Title</h1>
<h2>A Smaller Section Heading</h2>
<p>This is a normal paragraph of text. You can <strong>bold</strong> or <em>italicize</em> words.</p>

Links (<a>) and Images (<img>)

Some tags need extra details called attributes — written as name="value" inside the opening tag:

HTML
<!-- A clickable link -->
<a href="https://underlisted-x.com/honeyscript/">Visit HoneyScript</a>

<!-- An image (self-closing — no closing </img> tag needed!) -->
<img src="/honeyscript/honey-icon.png" alt="Honey AI Logo" width="64" height="64" />
  • href="..." tells a link where to go.
  • src="..." tells an image which file to load.
  • alt="..." describes the image for screen readers and shows up if the image fails to load. Always include alt!

Nesting: Boxes Inside Boxes

Just like you can put small boxes inside a bigger moving box, you can put HTML tags inside other HTML tags. Rule: Always close the inner box before closing the outer box.

HTML
<!-- GOOD: inner <strong> closes before outer <p> -->
<p>Welcome to <strong>My Studio</strong>!</p>

<!-- BAD: tags overlap -->
<p>Welcome to <strong>My Studio</p>!</strong>

Try It Yourself: Build a mini "About Me" page with an <h1> for your name, a <p> bio with one <strong> word, and an <a> link to your favorite website.

Chapter 3: Organizing Real Pages (Lists, Semantic Tags, `id` & `class`)

Real websites aren't just walls of paragraphs. They have navigation bars, bullet lists, cards, and footers.

Bullet & Numbered Lists

  • <ul> = Unordered List (bullets)
  • <ol> = Ordered List (1, 2, 3)
  • <li> = List Item (each individual line)
HTML
<h2>My Learning Checklist</h2>
<ul>
  <li>Learn HTML5 structure</li>
  <li>Master CSS3 layout</li>
  <li>Build my first zero-JS app in HTML+</li>
</ul>

Semantic Tags (Meaningful Boxes)

Instead of wrapping everything in generic <div> boxes, HTML5 gives you descriptive container tags that help both humans and search engines understand your page:

HTML
<header>Top brand &amp; navigation bar</header>
<main>
  <section>
    <article>A blog post, card, or product</article>
  </section>
</main>
<footer>Copyright &amp; bottom links</footer>

id vs. class: The Name Tag Rule

When you want to style or interact with specific boxes later, you label them with id or class:

  • id="hero-title" — Unique. Like a passport number: only one element on the page should have that exact id.
  • class="card" — Reusable. Like a team jersey: dozens of elements can share the same class.
HTML
<h1 id="hero-title">Featured Projects</h1>
<article class="card">Project One</article>
<article class="card">Project Two</article>

Chapter 4: Collecting User Input with HTML5 Forms

Whenever a website asks for your name, email, search query, or login, it uses an HTML5 <form>.

HTML
<form id="contact-form">
  <label for="user-name">Your Name</label>
  <input id="user-name" name="name" type="text" required minlength="2" placeholder="e.g. Maya" />

  <label for="user-email">Email Address</label>
  <input id="user-email" name="email" type="email" required placeholder="you@domain.com" />

  <label for="seats">Number of Seats</label>
  <input id="seats" name="seats" type="number" min="1" max="10" value="1" />

  <button type="submit">Send Request</button>
</form>

Built-In HTML5 Validation (Free!)

Notice those helpful attributes right on the <input> tags:

  • type="email" — Automatically knows an email needs @ and a domain.
  • type="number" — Only allows numbers (and shows a number keypad on phones!).
  • required — Stops empty submissions.
  • minlength="2" / min="1" / max="10" — Enforces length and number ranges automatically.

Why this matters later: In Part III, HTML+ reads these exact same standard HTML5 attributes to validate your forms automatically with valid-form("#contact-form")!

Chapter 5: Styling Your Page with Pure `<style>`

If HTML is the skeleton and walls of a house, CSS (Cascading Style Sheets) is the paint, lighting, and furniture.

You write CSS inside a <style> tag using simple rules: pick a box, then list property: value; pairs inside { ... }:

HTML
<style>
  body {
    background: #020504;
    color: #f4f7f5;
    font-family: Inter, system-ui, sans-serif;
    line-height: 1.6;
  }

  #hero-title {
    color: #34e89e;
    font-size: 36px;
  }

  .card {
    background: #08100c;
    border: 1px solid #34e89e;
    border-radius: 8px;
  }
</style>

The 3 Essential CSS Selectors

  1. body, h1, p (Tag selector) — Styles every tag of that kind.
  2. .card (Dot = Class selector) — Styles every element with class="card".
  3. #hero-title (Hash = ID selector) — Styles the one element with id="hero-title".

Beginner Design Tips That Instantly Look Pro

  • Give text room to breathe: Always set line-height: 1.5 or 1.6 on body.
  • Limit line width: Long lines are tiring to read. Use max-width: 65ch; on paragraphs.
  • High contrast: Light text (#f4f7f5) on dark obsidian (#020504), or dark charcoal (#111815) on crisp white (#ffffff).

Chapter 6: The CSS Box Model (Margin, Border & Padding)

Every single element on a webpage — even a word or a button — is a rectangle made of 4 layers from inside out:

  1. Content: The text or image itself.
  2. Padding: Breathing room inside the box, between the content and the border.
  3. Border: The visible outline around the box.
  4. Margin: Empty space outside the box, pushing neighboring boxes away.
HTML
<style>
  /* Always put this at the top of your CSS! */
  * {
    box-sizing: border-box;
  }

  .box {
    width: 300px;
    padding: 20px;        /* Space INSIDE the border */
    border: 2px solid #34e89e;
    margin: 16px;         /* Space OUTSIDE the border */
    background: #08100c;
  }
</style>

Why * { box-sizing: border-box; } Saves Your Sanity

By default, if you make a box width: 300px and add padding: 20px, browsers make it 340px wide (breaking your layout!). Adding box-sizing: border-box; tells the browser: "Keep the total width strictly 300px, including padding and border." Every professional web developer uses this on every site.

Chapter 7: Modern Layouts Made Easy (Flexbox & CSS Grid)

Historically, centering a box or placing three cards side-by-side was notoriously tricky. Modern CSS gives you two clean superpowers:

1. Flexbox (display: flex) — For 1-Dimensional Rows & Navbars

Use Flexbox whenever you want items lined up neatly in a single row (like a navigation bar or a row of buttons):

CSS
.navbar {
  display: flex;
  justify-content: space-between; /* Brand on left, links on right */
  align-items: center;            /* Vertically centered */
  gap: 16px;                      /* Clean space between items */
  flex-wrap: wrap;                /* Wrap nicely on small screens */
}

2. CSS Grid (display: grid) — For 2-Dimensional Card Grids

Use CSS Grid whenever you want a neat multi-column grid of cards that automatically adapts to any screen width:

CSS
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

Read that one magic line out loud: "Fit as many columns as possible, where each card is at least 260px wide and shares leftover space equally (1fr)." On a desktop, you get 3–4 columns. On a tablet, 2 columns. On a phone, 1 clean full-width column — automatically!

Chapter 8: Making Sites Look Great on Phones (Responsive Design)

Over half of all web visitors are on phones. Three simple habits keep your site looking sharp on every screen size:

  1. Include the Viewport Meta Tag in <head>:
HTML
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  1. Prevent Horizontal Overflow:
CSS
   html, body { overflow-x: clip; }
   img { max-width: 100%; height: auto; }
  1. Use @media Queries for Small Screens:
CSS
   @media (max-width: 640px) {
     body { padding: 16px; }
     h1 { font-size: 28px; }
   }

Congratulations! You now know the real, timeless foundations of HTML5 and CSS3. Everything from here on builds directly on what you just learned — without throwing any of it away.

Chapter 9: Memory Boxes (`<var>`, `<const>`, `<array>`, and the `$` Rule)

Up to now, your HTML pages have been static (like a printed poster). Now let's switch the top line from <!DOCTYPE html> to <!DOCTYPE html+> and unlock HTML+ (HoneyScript)!

First, give your page memory boxes using <var />:

HTML
<!DOCTYPE html+>
<var player="Maya" coins="100" vip="true" />
<const max-coins="9999" />

<h1>Welcome back, $player!</h1>
<p>Coins: $coins (Limit: $max-coins)</p>

The One Golden $ Rule

  • When you CREATE a variable, leave $ off: <var coins="100" />
  • When you USE or UPDATE it, put $ on: $coins
  • Locked constants (<const />) can never be accidentally overwritten.
  • Literal dollar sign before a variable: Write \$$coins to print $100. Plain prices like $25 stay normal text automatically.

Chapter 10: Making Pages React with `<rules>`

In traditional web development, making a button actually do something meant learning JavaScript (addEventListener, document.querySelector, let, ===).

In HTML+, you keep <style> 100% pure visual CSS, and put behavior inside a <rules> block using the exact same #id selectors you learned in Chapter 5:

HTML
<!DOCTYPE html+>
<var cash="500" />

<p id="hud">Balance: \$$cash</p>
<button id="earn-btn">Earn +$50</button>
<button id="buy-btn">Buy Coffee ($25)</button>

<style>
  body { background: #020504; color: #f4f7f5; font-family: sans-serif; padding: 28px; }
  #hud { font-size: 24px; color: #34e89e; }
  button { padding: 10px 16px; border: 1px solid #34e89e; background: #08100c; color: #fff; cursor: pointer; margin-right: 8px; }
</style>

<rules>
  #earn-btn:click {
    $cash: calc($cash + 50);
  }

  #buy-btn:click {
    @if ($cash >= 25) {
      $cash: calc($cash - 25);
      #hud { color: #68f7b8; content: "Enjoy your coffee! Balance: \$$cash"; }
    } @else {
      #hud { color: #f87171; content: "Not enough funds! Balance: \$$cash"; }
    }
  }
</rules>

Look how natural that reads:

  • #earn-btn:click → "When #earn-btn is clicked..."
  • $cash: calc($cash + 50); → "...add 50 to $cash."
  • @if ($cash >= 25) { ... } @else { ... } → "If $cash is at least 25, subtract 25; otherwise show a warning."

Chapter 11: Dynamic Lists & Live Typing (`<each>` & `bind`)

Combine an <array /> list, an <input bind="$var" />, and an <each> loop to build a live interactive roster or to-do list:

HTML
<!DOCTYPE html+>
<array tasks="Learn HTML5, Master CSS Grid, Ship HTML+ App" />
<var draft="" />

<h2>My Tasks ({len($tasks)})</h2>
<input id="task-in" type="text" bind="$draft" placeholder="Add a new task..." />
<button id="add-btn">Add Task</button>

<each item="t" in="$tasks">
  <div class="task-row">✓ $t</div>
</each>

<style>
  body { background: #020504; color: #f4f7f5; font-family: sans-serif; padding: 28px; }
  .task-row { padding: 10px 12px; margin: 6px 0; background: #08100c; border: 1px solid #34e89e; }
</style>

<rules>
  #add-btn:click {
    @if (len(trim($draft)) > 0) {
      $tasks: add(trim($draft));
      $draft: "";
    }
  }
</rules>

Chapter 12: Saving Data Forever (`<form>` + Embedded `<db>`)

Remember the HTML5 <form> you built in Chapter 4? Now attach a zero-setup embedded ACID database (<db />) so submissions save permanently to disk:

HTML
<!DOCTYPE html+>
<db id="store" src="./waitlist.hdb" />
<var name="" email="" count="0" msg="Join our launch list." ok="false" />

<form id="signup">
  <input name="name" type="text" bind="$name" required="true" minlength="2" placeholder="Your name" />
  <input name="email" type="email" bind="$email" required="true" placeholder="you@domain.com" />
  <button type="submit">Join Waitlist</button>
</form>

<p id="status">$msg ($count joined)</p>

<rules>
  body:load {
    $ok: db-create($store, "users", "name, email");
    $count: db-count($store, "users");
  }

  #signup:submit {
    @if (valid-form("#signup")) {
      $count: db-insert($store, "users", trim($name), lower(trim($email)));
      $msg: concat("Welcome aboard, ", trim($name), "!");
      $name: "";
      $email: "";
    } @else {
      $msg: form-error("#signup");
    }
  }
</rules>
  • Zero external database install: <db id="store" src="./waitlist.hdb" /> writes atomically and safely to a local file.
  • SQL-injection proof: Need to search? Use parameterized sql($store, "SELECT * FROM users WHERE email = ?", $email).

Chapter 13: Reusable Components & Built-In Tests (`<define>`, SRI & `<test>`)

1. Create Your Own HTML Tags (<define>)

Stop copy-pasting the same card or header across pages:

HTML
<!-- card.htmp -->
<define tag="feature-card" title="Title" desc="Details">
  <article class="card">
    <h3>$title</h3>
    <p>$desc</p>
    <slot />
  </article>
</define>

Include it cleanly in any page and pin its cryptographic SHA-256 fingerprint with honey hash ./card.htmp:

HTML
<link rel="include" href="./card.htmp" integrity="sha256-..." />

2. Built-In Plain-English Tests (<test>)

Prove your app works in 0 milliseconds with declarative <test> blocks (automatically stripped from production builds):

HTML
<test name="adds $50 when Earn is clicked">
  trigger: #earn-btn:click;
  assert: $cash == 550;
  assert-contains: #hud "550";
</test>

Run honey test app.htmp to verify, and honey fmt app.htmp to format your code cleanly.

Chapter 14: One File, Four Targets (Web, Static, Gmail Email & `.exe`)

Install the single honey CLI in one line:

  • Windows (PowerShell): irm https://underlisted-x.com/honeyscript/downloads/install.ps1 | iex
  • Linux (x86_64): curl -fsSL https://underlisted-x.com/honeyscript/downloads/install.sh | sh

Then compile your .htmp file to any target you need:

BASH
# 1. Live Zero-JS Web App (works even with JavaScript turned OFF!)
honey serve app.htmp --port 8080 --watch

# 2. Static Zero-JS Website (0 bytes of JS, instant load)
honey build --web --zero-js site.htmp -o dist/index.html

# 3. Gmail, Apple Mail & Outlook HTML Email (inline-CSS <table>, 0 <script>)
honey build --email receipt.htmp -o receipt.html

# 4. Standalone Executable (zero Node/Python/Rust needed for end users)
honey build --exe app.htmp --serve -o my-app.exe

You learned one clean foundation — HTML5, CSS3, and HTML+ — and now you can build real websites, emails, APIs, databases, and desktop/server apps.

Appendix: Complete HTML5, CSS3 & HTML+ Cheat Sheet

CategorySyntaxWhat It Does
HTML5 Structure<h1>, <p>, <a>, <img>, <ul>, <li>, <header>, <main>, <footer>Semantic page structure & content
HTML5 Labelsid="unique" · class="reusable"Names boxes for styling and rules
HTML5 Forms<form>, <input type="email" required minlength="2">, <button type="submit">Collects & validates user input
CSS3 Box Modelbox-sizing: border-box; padding: 16px; border: 1px solid #34e89e; margin: 12px;Controls inner & outer spacing cleanly
CSS3 Layoutdisplay: flex; gap: 12px; · display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));Modern responsive rows & card grids
HTML+ State<var cash="500" /> · <const cap="50" /> · <array items="A, B" />Typed reactive memory boxes (read with $)
HTML+ Behavior<rules> #btn:click { $cash: calc($cash + 50); } </rules>Reactive events, math & @if/@else
HTML+ Lists/Bind<input bind="$name" /> · <each item="x" in="$items"><p>$x</p></each>Two-way binding & dynamic lists
HTML+ Database<db id="store" src="./app.hdb" /> + db-create, db-insert, sql()Embedded crash-safe ACID database
HTML+ Reuse<define tag="my-card"> + <link rel="include" href="..." integrity="sha256-..." />Scoped custom tags & SRI hash-pinned partials
HTML+ Testing<test name="...">trigger: #btn:click; assert: $x == 1;</test>Built-in 0 ms tests (honey test)

Keep Practicing