-->
Previous | Table of Contents | Next |
by Steve Burnett
In Chapter 31, Surfing the Internet with the World Wide Web, you learned how to access the World Wide Web and were introduced to the various types of information available. You can click hypertext links and jump from place to place as fast as your connection allows. You can see Web pages with snazzy graphics and sound, lists, forms, and all sorts of neat stuff. But how do you actually create a Web page that other Web users can get to? Its not really as difficult as you might think. All you need is access to a Web server that uses Hypertext Transport Protocol (HTTP) and a set of documents written in Hypertext Markup Language (HTML).
This chapter looks at HTML to see whats involved in writing Web pages using HTML.
The Hypertext Markup Language (HTML) is the language used to develop Web pages and documents. HTML isnt a programming language like C++, Java, Pascal, or Perl; instead, its basically a cross-platform markup language thats designed to be flexible enough to display text and other elements (such as graphics) on a variety of viewers.
An HTML document consists of special tags that are embedded in an ASCII document. These tags are interpreted by Web browser programs, which format and display documents.
NOTE: HTML is a subset of Standard Generalized Markup Language (SGML), which is an international standard (ISO 88791) for electronic document exchange. SGML is a meta-language for defining and standardizing the structure of documents. SGML also describes a grammar you can use to design other markup languages. Any valid HTML document is also valid SGML. Like any SGML derived language, HTMLs grammar is described by a Document Type Definition (DTD) file.
HTML tells Web browsers how to display Web documents; however, the format information HTML provides is pretty general. Many different Web browsers are available for the Internet, such as Netscape Navigator, Microsoft Internet Explorer, or NCSA Mosaic. Many run under graphical interfaces such as the X Windows system or MS Windows. Some, such as Lynx, are ANSI browsers and are limited in terms of which graphical characteristics they can display.
As you write HTML documents, remember that they will look different depending on which browser the reader is using. All available Web browsers try to format HTML documents as properly as possible; however, what you see may not be what someone else using a different browser or even the same browser running under a different operating system sees.
As tools for the Web continue to evolve, creating HTML documents keeps getting easier. Many of the new tools hide much of the actual HTML coding from you. All you have to do is write the words, format your document, and save it to an appropriate location. Some browsers, such as Netscape Navigator Gold, include an editor that lets you point and click to create HTML pages. Other point-and-click tools include Microsoft FrontPage, Adobe PageMill, Allaire HomeSite and Macromedia DreamWeaver.
If you dont want to use an HTML editor or already have documents you want to put on the Web, there are several software applications you can use to convert word processing, desktop publishing, spreadsheet, or other documents into HTML. Newer versions of software packages, such as Adobe Framemaker, will include HTML as an option when you save a file.
ON THE WEB:
The following Web site has lots of conversion software available:
At some point, youll want to try your hand at creating your own HTML. Although many tools are available to help make writing HTML less tedious, youll probably find that they wont let you do everything you want.
Youll also find that HTML is relatively easy to work with. Because HTML is an ASCII-based markup language, all you need is an editor that will let you save files in ASCII format and a Web browser that you can use to view your Web pages as you develop them. You dont need a network connection to develop Web documents. Any Web browser should let you open a local HTML file and view it as though you had retrieved it from the Internet.
NOTE: You may find that using an HTML editor is useful. Some editors allow you to select the text you want to format and then apply HTML tags from a menu rather than type the tags in yourself. Other editors look more like word processorsyou select the text and select the type of formatting you want from a toolbar. In either case, youll probably need to edit the HTML directly to get the exact look and feel you want.
ON THE WEB:
You can check out some editors from Sausage Software HotDog/HotDog Pro and Macromedias at the following URLs (respectively):You can find a listing of HTML editors at this address:
Before you go any further into the syntax of HTML, look at a Web page and its HTML source code. Figure 32.1 shows a simple Web page.
FIG. 32.1 A simple HTML page.
Listing 32.1 shows the HTML source for this Web page. Here youll see the basic elements of an HTML page.
Listing 32.1 Source Code for a Simple HTML Page
<HTML> <HEAD> <TITLE>Hello Web!</TITLE> </HEAD> <BODY> <H1>Hello!</H1> This is the body section of a simple HTML page. <P> <IMG src=example.gif> </BODY> </HTML>
Previous | Table of Contents | Next |