HTML and CSS Reference
Task: Exercise 3.1: Creating Your First HTML Page
Now that you've seen what HTML looks like, it's your turn to create your own web
page. Start with a simple example so that you can get a basic feel for HTML.
To start writing HTML, you don't need a web server, a web host, or even a connection to
the Web itself. All you need is an application in which you can create your HTML files
and at least one browser to view them. You can write, link, and test whole suites of web
pages without even touching a network. In fact, that's what you're going to do for the
majority of this topic. Later, I discuss publishing everything on the Web so that other
people can see your work.
To start, you need a text editor. A text editor is a program that saves files in ASCII for-
mat. ASCII format is just plain text, with no font formatting or special characters. For
Windows, Notepad and Microsoft WordPad are good basic text editors (and are installed
by default). Shareware text editors are also available for various operating systems,
including, Windows, Mac OS X, and Linux. If you point your web browser to
http://www.download.com and enter Text Editors as a search term, you'll find many
applications available to download. If you're a Windows user, you might want to check
out HTML-Kit in particular. It's a free text editor specifically built for editing HTML
files. You can download it from http://www.chami.com/html-kit/. By the same token,
Mac users might want to look at TextWrangler, available from http://www.barebones.com.
If you prefer to work in a word processor such as Microsoft Word, don't panic. You can
still write pages in word processors just as you would in text editors, although doing so
is more complicated. When you use the Save or Save As command, you'll see a menu of
formats you can use to save the file. One of them should be Text Only, Text Only with
Line Breaks, or DOS Text. All these options will save your file as plain ASCII text, just
as if you were using a text editor. For HTML files, if you have a choice between DOS
Text and just Text, use DOS Text, and use the Line Breaks option if you have it.
Many word processors are including HTML modes or mechanisms
for creating HTML or XML code. This feature can produce unusual
results or files that simply don't behave as you expect. Using a
word processor to generate HTML is not a good idea if you plan
on editing the web pages later. When you work on the examples in
this topic, you should use a regular text editor.