Skip to content →

The Webmaster's Workshop

~ hand-code your first homepage, one small lesson at a time ~

★ WELCOME to the Workshop ★ grab a coffee, open a plain text editor, and build your very first web page ★ no experience required, no fancy programs, no money down ★

So you want to make a homepage?

Good. You have come to the right corner of the Web. My name is the webmaster, and I have been building pages by hand since the modem days. It is easier than it looks, and there is a small thrill the first time a page you typed yourself opens in the browser.

Here is the whole secret: a web page is just a plain text file with a few special words in angle brackets. That is HTML. You do not need a degree or an expensive program, a text editor and a browser will do. Work through these lessons in order, type the examples out by hand (do not paste!), and by the end you will have a page of your own.

Ready? Pour something to drink and let us begin.

Before you open the editor

You need exactly two things you almost certainly already have: a plain text editor (the plainer the better, resist the fancy ones for now) and a web browser to look at your work. Type your page, save it with a name ending in .html, then open that file in the browser. Change something, save, and press reload. That loop, type, save, reload, is the whole job.

A tip that will save you an afternoon: save early and save often, and keep every file for one page in the same folder. Browsers are fussy about spelling and about where things live.


Lesson 1 · Tags 101

A tag is just a word wrapped in angle brackets, like <p>. Most tags come as a pair: an opening tag and a matching closing tag with a slash in it, like <p> and </p>. The opening tag, the closing tag, and everything between them is called an element. You wrap your text in elements to tell the browser what it is: a paragraph, a heading, a bit of bold.

Here is the same little sentence two ways. Read the Markup tab to see what you type, then click Result to see what the browser draws.

Markup Result
TAGS.HTML
<p>This sentence is <b>bold</b>, and
this word is in <i>italics</i>.</p>

This sentence is bold, and this word is in italics.

See how <b>bold</b> turned into bold? You opened the element, put your text inside, and closed it again. Forget the closing slash and the browser will happily bold the rest of your page, a rite of passage we have all been through.

^ Top


Lesson 2 · Text & colours

Headings run from <h1> (the big one, use it once) down to <h6>. Paragraphs go in <p>. That is most of what you need to write a whole page. Type your words, wrap the important ones in <b> or <em>, and let the browser handle the spacing.

TEXT.HTML
<h2>My favourite films</h2>
<p>Here they are, <b>in order</b>.</p>
<p>Some words feel <em>important</em>.</p>

Sizes are worth a word. The Workshop sticks to seven honest text sizes and no more, so a page never turns into a ransom note:

Big and friendly.

Small print for the fine details.

About colour: pick from the 216 “web-safe” shades and every visitor sees the same page, even on a screen that only shows 256 colours. The Workshop keeps you inside that palette on purpose, your page will look right on your friend's ageing PC too.

^ Top



Lesson 4 · Lists

When you have a handful of things to name, use a list. Wrap the whole lot in <ul> for a plain bulleted list (or <ol> if the order matters and you want numbers), and wrap each item in <li>.

LISTS.HTML
<ul>
  <li>bread</li>
  <li>milk</li>
  <li>a fresh box of floppy disks</li>
</ul>

The browser draws the bullets and lines things up for you. Here is that very list, dressed in the Workshop's pixel bullets:

  • bread
  • milk
  • a fresh box of floppy disks

^ Top


Lesson 5 · Tables

A table is a grid of rows and cells. You build it row by row: <tr> starts a row, <th> is a heading cell (the browser makes it bold), and <td> is an ordinary data cell. Nest them carefully and mind your closing tags, tables are where a forgotten </td> comes back to bite you.

Markup Result
TABLES.HTML
<table>
  <tr>
    <th>Game</th>
    <th>Year</th>
  </tr>
  <tr>
    <td>Star Quest 3D</td>
    <td>1998</td>
  </tr>
</table>
My games, a row each
Game Year
Star Quest 3D1998
Comet Racer2000

A confession from the old days: we used tables to lay out whole pages, sidebars and all. It worked, but it tangled fast. Keep tables for real grids of data, like the one above, and your pages stay tidy and easy to read aloud.

^ Top


Lesson 6 · Images

Pictures go in with <img>, one of the few tags that stands alone with no closing partner. The src attribute names the file; put the picture in the same folder as your page to keep life simple. Always add width and height so the page can hold the space while the picture loads over a slow line.

IMAGES.HTML
<img src="house.gif"
     width="96" height="96"
     alt="a little pixel house">

Never skip that alt text. It is the words shown when the picture cannot load, and the words read aloud to a visitor who cannot see it. Write what the picture is, in a few plain words. Here is our example, drawn pixel by pixel:

A pixel drawing of a little house with a red roof, a yellow window and a green lawn
house.gif, drawn by hand, saved small.

Rule of thumb: photographs go in a .jpeg file; flat drawings, buttons and logos go in a .gif. Keep them small, every kilobyte is a second of your visitor's afternoon.

^ Top


Lesson 7 · Forms

A form is how a visitor talks back, a guestbook, a poll, a search box. Wrap the whole thing in <form>. Each box is an <input> or a <textarea>, and, this part matters, every box gets a <label> tied to it. Match the label's for to the field's id and a click on the words jumps into the box; a screen reader announces it too.

FORMS.HTML
<form>
  <label for="nm">Name:</label>
  <input id="nm" type="text">

  <label for="msg">Message:</label>
  <textarea id="msg"></textarea>

  <button>Sign it</button>
</form>

And here is a real one to try. It is only for practice, it does not send anywhere, because catching a form needs a little program on the server, which is a lesson for another day.

^ Top


Lesson 8 · Frames

Frames split the browser window into panes, each showing its own page. The classic trick is a narrow menu on the left that never moves while the pages come and go on the right. Instead of a <body>, a frames page has a <frameset> that carves up the window and points each pane at a file.

FRAMES.HTML
<frameset cols="150,*">
  <frame src="menu.html">
  <frame src="main.html">
</frameset>

The cols="150,*" means “a menu 150 pixels wide, and the rest of the window for everything else”. Two files, one tidy layout.

Fair warning: frames muddle the Back button and make pages hard to bookmark, so many webmasters are quietly retiring them. If you want the look without the trouble, the Workshop's own layout tools give you a menu that stays put while the page scrolls with none of the headaches. Learn frames so you can read old pages, then reach for the modern version.

^ Top


Grab my graphics

Every homepage needs a little sparkle. Here are three tins of free goodies from the workbench, bullets, divider lines, and link buttons. Take what you like for your own page; a link back to the Workshop is thanks enough.

bullets.zip

Pixel bullets for your lists. Comes in stars, arrows, disks and paws.

  • stars for the cool stuff
  • arrows for the rest
  • paws, for the cat pages
lines.zip

Divider bars to break up a long page. A few of my favourites:





buttons.zip

The trusty 88×31 button. Link back to me with one:


A little glossary

New words pile up fast. Here are the ones you will keep bumping into, in plain language.

Words worth keeping
Word What it means
HTMLHyperText Markup Language, the tags this whole page is made of.
TagA word in angle brackets, like <p>, that marks up your text.
ElementAn opening tag, its closing tag, and everything between them.
AttributeExtra information inside a tag, like href or width.
URLThe address of a page or file on the Web.
HyperlinkClickable text or a picture that carries you off to another page.
BrowserThe program that reads HTML and draws the page.
View sourceThe browser menu that shows you any page's raw HTML. Your best teacher.

Questions I get a lot

Click a question to open the answer.

Do I need an expensive program?

No. A plain text editor and a browser are plenty for everything in this workshop. The fancy editors are convenient later, but they hide the HTML, and right now you want to see it.

How do I put my page on the Web so others can see it?

You need a scrap of web space, your internet provider probably gives you some, or a free host will, and a little program called an FTP client to copy your files up to it. Keep the same folder layout you used at home and your links will still work.

Why does my page look different in another browser?

Every browser draws things a little differently, and that is normal. Test your page in more than one, keep the design simple, and do not chase pixel-perfection, nobody else is comparing.

My image shows up as a broken box. Help?

Nine times out of ten it is the file name. Check the spelling in your src, check the file is in the same folder as the page, and remember that many servers care about capital letters: House.GIF is not house.gif.


Where to go next

That is the whole beginner course, you can now hand-build a real page. When you are ready, the next courses cover styling your page with a little CSS, and drawing your own animated buttons. They are on the workbench now:

More lessons under construction!
Come back soon, styling and graphics are next.

Start the lessons again


Sign my guestbook

Made it all the way to the bottom? Then you are exactly the sort of visitor a webmaster hopes for. Leave a note, say where you are writing from, and tell me what you are building. Every homepage deserves a guestbook, and mine gets lonely.

Sign my guestbook →


The Homebrew HTML webring

The Workshop belongs to a ring of pages by people who still build the Web by hand. Follow the ring and you will find a hundred more homepages just like this one, some polished, some gloriously not. If you keep a hand-coded page, you are welcome to join.

Document: Done 8 lessons loaded Best viewed at 800×600