Fig.1 Select Container...
Fig.2 Nested containers...
|Even those of us who
prefer a non-WYSIWYG editor must admit that HTML tags are sometimes a
pain to work with. It can be difficult to see the structure in a
heavily-formatted page. This is especially true when we're
dealing with HTML "containers", tags with opening and closing
elements that often span quite a bit of text.
For instance, if you use combinations of fonts and styles within tables, you may find the formatting logic hard to read (and to debug). Part of the problem is that tags can be nested and so it's not always clear with which opening tag a given closing tag is paired.
Cmd-B is the shortcut for HTML mode's Select Container command. When you use this command, HTML mode selects matching tags that include the current cursor position or text selection (Fig.1).
If you repeat Select Container, the selection expands to next "outer" set of matching tags (Fig.2).
Shift-Cmd-B is the shortcut for Select in Container, a variation in which only the contents and not the enclosing tags are selected. This is handy if you're applying more than one tag to a chunk of text.
Let's say you want a heading to be displayed with a particular font and style. You can reduce this markup to a very few keystrokes by selecting the text, applying the font tag, using Shift-Cmd-B, and then applying the style tag. (If you were going to be doing this often, you could also record a simple keyboard macro that would reduce these steps to one keystroke.)
These are only two of the eleven container editing commands found under HTML mode's HTML Utilities -> Editing submenu.
|Example 1 | 2 | 3 | 4 | 5||Home | Overview | Manual | Download|
|Visitors:||Website by Tenzo Design © 1997||Page updated:|