Using an HTML Editor

Many programs can create HTML output. In practice, HTML editors cover a continuum. At one extreme are editors that attempt to work like what-you-see-is-what-you-get (WYSIWYG) word processors. These editors display features such as bold or italic text, fonts, inline graphics, and lists more or less as they'll appear in a web browser. At the other extreme are basically ordinary text editors with a few features to ease creation of HTML, such as menus from which you can insert HTML codes.

Note True WYSIWYG in HTML editors is impossible because you can't know how a reader's web browser will render the HTML you create. Features such as fonts, browser window width, and graphics capabilities vary substantially from one system to another. Therefore, you shouldn't take such features as displayed in an HTML editor's window very seriously.

Many word processors can export in HTML format. Abi Word, KWord, OpenOffice.org, WordPerfect, and others all support creation of HTML documents. Typically, you can create a file just as you would any other and the program generates suitable HTML when you save it. Word processors, though, are not usually designed for creating or editing HTML. Some lack good mechanisms for inserting important HTML features such as links, for instance. Some word processing features may be lost in the conversion to HTML. For these reasons, I recommend using a word processor for HTML creation only in a pinch or if you want to convert an existing word processing document to HTML.

Other editors are designed to create HTML. Examples include ASHE (http://www.cs.rpi.edu/pub/puninj/ASHE/), August

(http://www.bostream.nu/johanb/august/), Bluefish (http://bluefish.openoffice.nl), Quanta (http://quanta.sourceforge.net/), and WebSphere Studio Homepage Builder (http://www.ibm.com/software/webservers/hpbuilder/). Most of these programs are open source, but WebSphere is commercial. Many of the open source editors are far from WYSIWYG; for instance, Figure 23.3 shows Quanta displaying the default Mandrake Linux Apache web page shown in a web browser in Figure 23.1. Nonetheless, these editors typically include menu options and button bars designed to help you create HTML. Some also include preview modes so you can get some idea of how a web browser might render the page. With a little basic familiarity with HTML (as described in the next section, "Creating HTML by Hand"), you can do a lot with one of these basic editors.

>5 Click To expand

Figure 23.3: Many HTML editors are basically just ordinary text editors with highlighting and special tools to help manipulate HTML tags.

Some web browsers ship with built-in HTML editors. Netscape and Mozilla, for instance, provide an HTML editor component called Composer. These editors tend to be more GUI-oriented than most Linux HTML editors; they hide HTML tags and instead display text as a web browser is likely to display it. Of course, even this display isn't truly WYSIWYG, because another browser, or even the same browser on a different system, might display the text in a very different way than Composer does.

One problem with HTML editors, and especially with the ones that hide HTML tags, is that they often produce poor HTML. Such documents may display correctly on most web browsers, which tend to be remarkably tolerant of HTML errors; but they may cause problems on a few browsers. If you use such an editor, careful testing is particularly important. This topic is described in the upcoming section, "Testing Web Pages."

0 0

Post a comment