When you write a Web page, no matter how you go about it, what you really end up with is an HTML file that can be published on a Web server.
An HTML file (see Figure 17.4) contains all the text that appears on the page, plus HTML tags.
Figure 17.4. The HTML source file of the page shown in Figure 17.1.
Tags are codes in an HTML file that tell a browser what to do. For example, if the tag <b> appears before a word and the tag </b> appears after the word, those tags tell browsers to show that word in bold type when displaying the page.
Besides controlling the formatting of the page, the tags in an HTML file label each chunk of text as a particular element of the page. For example, HTML tags identify one line of text as the page's title, blocks of text as paragraphs, certain lines or words as links, and so on. Other HTML tags designate the filenames of inline images to be incorporated into the page by the browser when the page is displayed.
A Web browser is a program that knows how to do at least two things:
What's important to remember is that the HTML tags do not offer you the kind of control over the precise formatting of a page that you would have in a word processor. HTML mostly just identifies what's what. Each browser decides differently how to format those elements onscreen, though the two major browsersNetscape and Internet Explorertend to show most Web pages almost identically.
Extensions are special additions to the standard HTML language, usually created by a browser maker to enable that browser to do tasks not included in HTML. See "Extensions: Love 'Em!, Hate 'Em!," later in this chapter.
At the time of this writing, the two most popular browsersvarious versions of Netscape Navigator and Internet Explorercomprise the overwhelming majority of the browser market. Although subtle differences exist in the HTML tags each one supports, the perpetual competition between these two has resulted in two browsers that display most Web pages identically. To most potential visitors on the Web, therefore, your Web page will look roughly the same as it does to you in Netscape as you work on it.
To folks using browsers other than the two big shots, your page will always show the same text content and general organization, but its graphical content and other aesthetics might vary dramatically from browser to browser. In fact, in some cases, pictures and any other graphical niceties might not even show up.
To illustrate this browser-to-browser variation, Figures 17.5 and 17.6 show exactly the same Web page as shown earlier, in Figure 17.1. That figure, however, displays the page through Netscape, and Figures 17.5 and 17.6 show it through two other browsers: Opera and DosLynx, respectively. Compare these two figures and observe how the presentation differs in each one.
Figure 17.5. The same page as shown in Figure 17.1 is shown in Opera.
Figure 17.6. The same page, as shown in Figures 17.1 and 17.5, shown in DosLynx.
DosLynx, the browser shown in Figure 17.6, is a text-only browser for DOS. (You remember DOS, don't you?) Disappearing rapidly from the Web (but still out there), these browsers cannot display inline graphics and display all text in the same-size typeface, although important elements, such as headings, can be made to stand out with bold type or underlining. Some people use text-only browsers out of choice, although most people do so because they lack the proper type of Internet account or the proper hardware for a graphical browser.
Although text-only browsers have all but disappeared, as a new Web author, you should keep in mind the possibility that some folks can't see the pictures in your pages. For them, you need to make sure that the text in the page gets the job done, whether the pictures appear or not.
Try it yourself.