Back to Tutorials
HTML stands for HyperText Markup Language, and it is used to describe how information is presented on a web page. Anyone can write HTML, all that you need is a text editor (Notepad works fine for Windows users).
Web sites are made up of many HTML files, and each individual page on a site is usually a separate file. Some sites use databases and more complex methods of organizing a site, but these tutorials demonstrate the traditional structure for a site where one file represents one page.
HTML files are text files, but with special codes called tags that tell web browsers how to format and present text and graphics information. Tags look like this:
<p>All tags are a character or group of characters enclosed by less-than and greater-than symbols. Most tags are used in sets, an opening tag and a closing tag surrounding some text; the closing tag is just like the opening tag but uses a slash after the less-than symbol:
<h1>"h1" tags are enclosing this sentence.</h1>Tags can be nested inside other tags as well (here the "b" tags are nested inside the "p" tags):
<p><b>Bold</b> text.</p>Writing nested tags can get a bit tricky, especially when you're working a few levels deep in a set of tags. The general rule to follow is that if a set of tags starts inside another set of tags, the inner tags must be closed before the outer tags. Or, in other words, tags operate on the LIFO principle (Last In, First Out).
| Incorrect Nesting | Correct Nesting |
| <p><b>Text</p></b> | <p><b>Text</b></p> |
| <p><i>Text<b> text</i></b></p> | <p><i>Text</i> <b>text</b></p> |
Information contained inside a set of tags can span more than one line in your HTML file, but any extra spaces will be removed automatically by the web browser:
| HTML written like this... | ...looks like this in the browser |
| <p>HyperText Markup Language</p> |
HyperText Markup Language |
Some tags are not closed, only an opening tag is used. They cannot enclose text or other tags, and often serve special purposes, like the image tag:
<img>Many tags have attributes which are placed inside the opening tag. Most attributes receive values, which are normally set in quotes, while a few attributes take no values. Attributes go after the tag name, before the greater-than symbol, and if there are multiple attributes in a tag they are separated by spaces:
<table border="1" align="right">...</table>Now that we've explained what tags look like and how they are written, we will begin to explore the basic structure of an HTML file next.
Next Step: Getting Started with HTML
Back to Tutorials
Back to 3D Metropolis/Design
© 2002-2003 Scott Schwab.