Comments

To include comments in an HTML document that will be ignored by the browser, surround them with <!-- and -->. After the beginning comment delimiter, all text up to the next occurrence of --> is ignored. The following example includes a comment:

<HEAD>
<TITLE>My Home Page</TITLE>
<!-- Created 01/08/96 -->
</HEAD>

Converting Documents to HTML

In most cases, you will want to convert any existing documents to be stored on the Web server into HTML documents. This will ensure cross-platform compatibility and conform to WWW document standards.

To convert your existing documents:

1 Save your document as an ASCII text file. Unfortunately, graphics and pre-existing formatting cannot be imported into an HTML file. You’ll have to add these once you have your text imported.

2 Start WebEdit PRO.

3 Choose Open from the File menu.

4 In the Open dialog, select the text file that you want to convert to an HTML file and click OK. (You may need to select Text Files or All Files in the Files of Type drop-down list.)

5 Insert the HTML tags, images, and so on, as described earlier in this chapter.

6 Save the file in WebEdit PRO. The file is now an HTML file.

Using Special Characters

Certain characters such as the greater-than symbol and ampersands are interpreted as markup by HTML browsers; they will not be displayed unless you enter them using a special format. Other characters such as foreign language characters, math symbols, and symbols like "™" also need to be entered using a special format. WebEdit PRO provides an easy way to enter these types of characters with the Special Characters feature.

To insert a special character:

1 Undisplayed GraphicChoose Special Characters from the Insert menu, or click the Special Characters button in the user toolbar. The Special Characters dialog displays.

2 Select the tab that includes the symbol you want to insert.

3 Click Add to insert the symbol or Replace to replace text you have already entered in the HTML document.

4 Click the character you want to insert.

Creating Custom Tags

If there are any tags or text elements that you regularly add to your documents, but which are not among the tags supported by WebEdit PRO, you can add your own custom tags with the "user-defined tags" dialog box.

To add a new tag or text element:

1 Click the Custom button on the menu toolbar and select Add or Edit Custom Tags. Or choose User-Defined Tags from the Insert menu, then select Add or Edit Tags.

The User-Defined Tags dialog displays:

Undisplayed Graphic

User-Defined Tags dialog

2 Select the Add button on the User-Defined Tags dialog box.

3 Add the new tags.

4 When done, click OK.

To insert this tag into a document, click the Custom button on the menu toolbar and select the tag you wish to enter. Alternatively, you can use the shortcut key WebEdit PRO assigns for each item on this menu (the Alt key plus a sequential number). You can also access user-defined tags by choosing User Defined Tags from the Insert menu and selecting User Tags to display a list of tags.

User-defined tags work just like WebEdit PRO’s built-in tags; if you have both a begin and end tag, you may highlight your text first. Inserting the tag will then put the begin tag at the beginning of the selected text and the end tag at the end.

You can also specify the name of a text file as a user-defined tag, e.g., c:\wwwwroot\myfile.html. Choosing this tag causes the contents of the file myfile.html to be inserted into the active document at the current insertion point.

Server-Side Includes

This section provides a brief introduction to server-side includes (SSIs). Server-side includes are special markup tags that you can use in your HTML documents. The SSI tags, variables, and data that are supported by WebEdit PRO are described, with examples, in WebEdit PRO’s online help; choose Server Side Includes from the Help menu to access the SSI online reference.

Important!
In order for you to be able to use SSIs in your HTML documents, the HTTP server where your document are stored must be SSI-enabled by the system administrator.

The idea behind SSI is to be able to include additional information in an HTML document just before it is sent from the server to the browser that requested it. The server replaces each SSI directive with the result of executing that SSI directive—thus "server-side includes." The person viewing your document never sees the SSI directives themselves.

The following are examples of uses for SSIs:

• Insert the local date and time into your document.

• Include the name of the person using the remote client (browser) in your document—most likely this will be the person’s e-mail address.

• Insert the date and time a document was last modified into your document.

• Insert an entire file into your document.

• Execute programs stored on the server and insert the output into your document. This ability to execute programs on the server is the reason the server must be SSI-enabled by a system administrator.

• Query an ODBC-compliant database with SQL statements and insert the returned data into your document.

• Use if, goto, and label SSI tags to conditionally execute SSI commands and print document contents.

SSI tags use the HTML comment format and add a special character denoting that it is an SSI tag: # (the pound sign). As mentioned in the previous section, the format for HTML comments is:

<!-- this is a comment-->

The SSI start tag adds the pound sign, as in the following example:

<!--#exec cgi="myfile.cgi"-->

The SSI end tag is the same as the comment end tag.

WebEdit PRO includes a complete online reference for the SSI tags, variables, and data that it supports. To access the online SSI reference, select Server Side Includes from the WebEdit PRO Help menu. In the Server Side Includes main help topic, choose the SSI Tags, Variables and Data topic for explanations and examples.

Important!
You should save HTML documents that contains SSIs with the
.shtml (or .shtm, or .sht) extension. If the server has been SSI-enabled, it has probably been set up to examine (parse) a file for SSIs only if it has one of those extensions.

For More Information

HTML and the Web are still in their infancy and growing rapidly. The HTML Reference in WebEdit PRO’s online Help is quite extensive and clearly indicates the HTML version or proprietary browser version where a tag or attribute originated. Of course, it may not include all of the most recent information.

The documents available at the following Web locations will help you keep abreast of developments as well as help you broaden and deepen your knowledge of HTML.

• The Yahoo collection of HTML Tutorials and Guides:

http://www.yahoo.com/Computers_and_Internet/
Information_and_Documentation/Data_Formats/HTML/Guides_and_Tutorials/

• The official HTML specification:

http://www.w3.org/pub/WWW/MarkUp/

• The index of World Wide Web Consortium (W3C) publications:

http://www.w3.org/pub/WWW/TR/

You will also find a range of HTML guides and references, from beginner- to expert-level, at most larger bookstores or computer stores.

Luckman Interactive is dedicated to bringing you the best in Web publishing tools, and we wish to thank you again for choosing Luckman Interactive’s WebEdit PRO!