This chapter introduces tags, the actual controls used in HTML documents. The objectives important to this chapter are:
HTML stands for Hypertext Markup Language. Hypertext means that we can jump from point to point, document to document with a single click or keypress. Markup language means that we control the overall appearance of the documents by using tags, which are codes embedded in the document. Tags are commands to the software that is being used to view HTML documents, commands that tell the software (the browser) what to do and how.
The great thing about writing this kind of document is that you don't need anything special to do it. You just need a word processor or editor that can save files in plain ASCII format. The browser that your reader uses handles the details of appearance. This is the limitation of HTML: that the browser reading the file will obey the commands in tags in its own way, and you can't do much about controlling it. This is still a good thing, since it means that the browser can be written for a high powered system, taking advantage of all its features, or it can be written for a low end system that can't do much in the way of graphics, and the same page can still be read by both systems.
HTML is an evolving language. Our text begins with tags that are common to versions since 2.0, and continues through 3.2 and a bit beyond. New tags are added to the language these days by one of the browser companies (typically Netscape and Microsoft) throwing some new feature the newest version of their browser. People see it, use it, and it becomes a standard.
An HTML document has basically three parts:
What you see on-screen in a browser is the result of the browser's interpretation of the HTML document. To see the actual document, the source code of the document, you can tell the browser to show it to you by using the View menu in Netscape Navigator or Internet Explorer. By the way, when you save web page, what you are saving is the source code, not the on-screen image.
Creating your first HTML page is easy. To start with the basics, I will assume that you have access to the software we use in class, and a computer running Windows. Use an ASCII editor like Notepad or Wordpad. Enter the text you want on your page and save it as Text. This is important: save in plain text format, no special word processor formats. It is advised to save the file with an extension: either .htm, or .html. If you are using a DOS system, it will not let you have more than three characters in a file extension.
Of course, you are not done. You need tags to make it HTML. Tags usually come in pairs, and a pair surrounds text of a certain type. Required tags:
Much of the book is concerned with tags that make the text look better. You are given one in this chapter:
It is recommended to save your file, then open the file in a browser without closing the editor you are using. You can then make changes to the page, save the changes, and review the changes by clicking the Refresh or Reload button on the browser. This is a time saver, compared to opening the file over and over in the browser to check your work.