A Simple Sample Web Page

By Sheldon Brown

Demonstrating a few HTML features

HTML is really a very simple language. It consists of ordinary text, with commands that are enclosed by "<" and ">" characters, or bewteen an "&" and a ";".

You don't really need to know much HTML to create a page, because you can copy bits of HTML from other pages that do what you want, then change the text!

This page shows on the left as it appears in your browser, and the corresponding HTML code appears on the right. The HTML commands are linked to explanations of what they do.

Line Breaks

HTML doesn't normally use line breaks for ordinary text. A white space of any size is treated as a single space. This is because the author of the page has no way of knowing the size of the reader's screen, or what size type they will have their browser set for.

If you want to put a line break at a particular place, you can use the "
" command, or, for a paragraph break, the "

" command, which will insert a blank line. The heading command ("<4>") puts a blank line above and below the heading text.

Starting and Stopping Commands

Most HTML commands come in pairs: for example, "

" marks the beginning of a size 4 heading, and "

" marks the end of it. The closing command is always the same as the opening command, except for the addition of the "/".

Modifiers are sometimes included along with the basic command, inside the opening command's < >. The modifier does not need to be repeated in the closing command.

This is a size "1" heading

This is a size "2" heading

This is a size "3" heading

This is a size "4" heading

This is a size "5" heading
This is a size "6" heading

Copyright © 1997, by Sheldon Brown

If you would like to make a link or bookmark to this page, the URL is:
http://sheldonbrown.com/web_sample1.html