Example 2. Applying HTML tags

Fig.1 Styles menu...
Fig.1 Styles menu...

Fig.2 Specifying attributes...
Fig.2 Specifying attributes...

Fig.3 Tab marks...
Fig.3 Tab marks...
Most of us use more than one approach when we're creating HTML documents. We might begin with a plain text file and mark it up, or we might write something from scratch in the HTML editor. Often, we do both.

Using HTML mode, you can apply tags to existing text by selecting it and then choosing the appropriate HTML commands. If you want a heading displayed in bold, let's say, select it and then pick Bold from HTML Mode's Styles menu (Fig.1).

The keyboard shortcut Ctr-Opt-B is a faster way of doing this. Most commands under the HTML mode menu have their own keyboard shortcuts. You can easily modify them and add your own. In fact, any Alpha or HTML mode command can be given a keyboard equivalent and the List Bindings command under the Config menu will show you the current definitions.

HTML mode has dialogs associated with all HTML elements that take attributes. For example, if you enter a link to an image, you need to give values for height, width, border, etc. (Fig.2).

These dialogs help you enter attribute data more accurately and save keystrokes. Consider, for instance, the ways you can specify a URL:
  1. Type the URL into a text box.
  2. Pick from the URL cache popup menu. (HTML mode saves the URLs you use in HREFs, SRCs, etc. A similar cache is kept for window names so you can quickly specify target windows.)
  3. Select using the File... dialog.
Where possible, HTML mode attempts to provide the information you'll need to complete the attributes dialog. For instance, when you select a GIF or JPEG using the file dialog, height and width attributes are calculated automatically.

If you're an HTML geek with a need for speed, you may even choose to dispense with dialogs entirely. HTML mode offers another way of specifying attributes using prompts in the status bar at the bottom of the screen. (We won't illustrate this here, but see "Using the status bar" in the manual section called "Giving attributes to an element".)

When you're creating new material in the editor, you may prefer to apply tags as you type, rather than going back to mark up text you've already entered.

Let's say you're creating a numbered list. You choose HTML mode's Lists -> Numbered command (Ctr-Cmd-O), then specify the number of elements and their attributes -- and the result is a "template" for a numbered list with the cursor positioned at the first element (Fig.3).

Note the bullet characters. Those are called "tab marks". They show where your cursor will move when you press the Tab key. You type a list element, press Tab, type another element, press Tab -- and so on until a final Tab takes you past the list's closing tag. Tab marks make it easy to move through a template with the minimum of keystrokes.

HTML mode doesn't lock you into any one way of working. If you like some things done automatically some of the time, or you like to fiddle with the details, HTML mode provides as much or as little help as you want without getting in your way.

Example 1 | 2 | 3 | 4 | 5 Home | Overview | Manual | Download

Visitors: Website by Tenzo Design © 1997 Page updated: