htmlcss

A basic HTML document

This sample document is targeted for the upcoming HTML5, but works in current browsers as well.

<!DOCTYPE html>
<html>
    <head>
        <title>My First Webpage</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    </head>
    <body>
        <p>Hi, I'm your first paragraph.  It's nice to meet you!</p>
    </body>
</html>

Despite this being one of the shortest HTML documents you'll ever see, there are lots of things to talk about in it! The first thing you need to understand is that anything in angle brackets <like this> is an HTML tag. If it has a / (forward slash) at the beginning </like this> it's a closing tag; otherwise it's an opening tag. In general, every opening tag must have a matching closing tag, and such a pair of tags is an HTML element. We'll talk about that again later.

Required tags

Most of the tags in the sample document must be included in every document.

Optional tags

References

  1. A Dictionary of HTML META Tags (Don't use frames, kids!)