Getting started

8TML

This page walks you through a first 8TML page, from an empty file to a page on the web.

1. Create the file

An 8TML page is a plain text file with the extension .8tml. Any text editor works. Call the first one index.8tml: a client that is given only a site address or a folder (a URL ending in /) loads index.8tml from there.

2. Write the header

Every page starts with a header between two --- lines. The first key must be 8tml, the version of the format:

---
8tml: 1
title: My first page
case: mixed
---

title is shown by the client, for example in a title bar, the history or the bookmarks. case: mixed asks for upper- and lowercase letters; without it, pages are shown in uppercase, which is how many 8-bit machines start up. See Page header for all keys.

Without this header a client shows the file as plain text, with no markup at all.

3. Write the content

Below the header you write the way you would write Markdown:

---
8tml: 1
title: My first page
case: mixed
---

# Welcome to my page

I collect *C64 games* and write about
the ones I like best.

## My favourites

1. Paradroid
2. Impossible Mission
3. Boulder Dash

Write to me on the [guestbook](guestbook.8tml).

Preview: Commodore 64, 40 columns

                                            
Welcome to my page

I collect C64 games and write about the
ones I like best.

My favourites

1. Paradroid
2. Impossible Mission
3. Boulder Dash

Write to me on the guestbook.

Lines that belong together are joined into one paragraph, and the client wraps it to the width of its screen: 40 columns on a C64, 32 on a ZX Spectrum, 22 on a VIC-20. A blank line starts a new paragraph.

4. Add some color

Colors have names. Put a word between <yellow> and </>:

I like <yellow>yellow</> and <lightblue>light blue</>.

Preview: Commodore 64, 40 columns

                                            
I like yellow and light blue.

A machine without colors simply shows the text. The full list is on the Colors page; a whole site can get its colors from a stylesheet.

5. Put it online

Copy the file to any web server that answers over plain HTTP. Most 8-bit machines can’t do HTTPS, so the page must be reachable without a redirect to https://. The Hosting 8TML pages guide lists everything a server should do.

On T8wn, every resident will get a plot that already does all of this.

Next steps