You might have noticed that I've been using the term "HTML document" instead of "HTML file." There's a reason for this; HTML documents aren't necessarily files on a computer. An HTML document is a series of characters that, through its special syntax, defines a document. These characters may be stored in a single disk file, but this is not necessary. They may be created on the fly by a program, or may (as is most often the case) be received over a network.
HTML was designed primarily as a language to be used for creating World Wide Web pages. You're probably learning HTML in order to create a Web page. People have started to use it for other uses, but it might be useful to note (one of my rants, you'll get plenty of these) that it's not a very good language for other uses. There are fine document formats for all kinds of uses, but HTML was created for the Web, and is most suitable for the Web.
So how do you publish a Web page? Well, to do this you need a Web server. A Web server is a program that runs on a computer connected to the Internet, that serves out Web pages. This tutorial will not cover the topic of setting up a Web server or publishing your HTML documents on one. Instead we're going to talk about how to create an HTML document; we'll worry about publishing it later.
Now, how are you going to create your HTML document? The easiest way is to create an HTML file using a text editor. Note that a text editor is not a word processor. A word processor is a program that creates a document ready for printing, and stores it in its own format. Recent times have seen word processors that try to store their documents as HTML, but they usually do a terrible job of doing this. What you need is a program that edits simple text files. An example would be the Windows Notepad, or SimpleText for the Macintosh. It doesn't matter which program you use, as long as it is a simple text editor. In the future, we'll have a look at some of the text editors that you can use, and even some that are specially made for creating HTML documents and can do some of the work for you. Try to avoid these for now - they might confuse you with HTML features we haven't discussed yet. So pick something really, really simple, like the Windows Notepad, SimpleText for the Macintosh, or one of the hundreds of text editors available on Unix systems.
Now create a file, and call it anything you want. On some systems such as Windows, you'll need to give it an extension of .html or .htm to indicate that it's an HTML document. For instance, you might want to call it tutorial.html. As you read through this tutorial, you'll be told to type things into your text file, and by the end of the tutorial you'll have a complete HTML document. In fact, you can stop worrying about typing anything into your file until the end of the tutorial, where we have the complete document listed, so concentrate on reading the tutorial and you can create your HTML file later on if you want to.
In order to view your HTML file, you'll need a program that can do this. The technical term for this is an HTML User Agent. A User Agent is a program that can understand HTML documents and process them is some way. One type of user agent is a Web Browser, or just browser for short. You're probably using one to read this tutorial, so I won't bother with telling you how to get one. After you've created your HTML document, you can open it with your browser and view it. If you can't be bothered to do even that, we've included a link to a copy of the document we're going to create at the end of this tutorial.
Well, here we go. It's time to create our first HTML document
Labels
- group discussion (1)