Making HTML

Cute mammal

Web pages are made of HTML. An HTML file contains instructions on how to make a display. For example, suppose you wanted to make this display:

Display

You could describe it like this:

  • Make a heading, with a big, bold font. Make it say: "Joke"
  • Leave some vertical space. Then show: "A priest, a rabbi, and a pastor walk into a bar." Use regular size font, not bold.
  • OK, another line, with some space between them. In the same regular font, show: "The bartender asks: "What is this, a joke?"

HTML is like that description, but in a form a computer can work with. Here's the code:

  • <h1>Joke</h1>
  • <p>A priest, a rabbi, and a pastor walk into a bar.</p>
  • <p>The bartender asks: "What is this, a joke?"</p>

h1 means "Make a heading." It defaults to a big, bold font.

p means "Make a paragraph." It defaults to a regular font, with blank space above and below.

Put that code into a file on your server with an html extension, point a browser at it, and you'll get that display.

(There are pieces missing, as we'll see later, but it will be similar.)

That's what HTML does: describe a display.

You'll start by typing HTML directly. Later, you'll write programs that output HTML. That's how web apps work.

You'll learn a tiny chunk of HTML in this course, enough to make simple web apps. Once you've learned the core, it's easy to learn more tags on your own.

Off we go!