• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Chapter 4. Editing HTML > Selecting Parent and Child Tags

Selecting Parent and Child Tags

While you're editing tags, you may find it difficult to select a tag for whatever reason. You can toggle from the tag you've selected with the QT editor to its immediate surrounding tag, called the parent tag, or to the immediate tag it envelops, called the child tag. This works whether you're working in the QT editor or just in the Document window.

To select the parent tag:

  • Press Ctrl+Shift+< (Less Than); on the Mac, it's Command+Shift+< (Less Than).


    From the menu bar, select Edit > Select Parent Tag (Figure 4.45).

    Figure 4.45. You can see in the tag selector that of the two tags modifying the text, the parent tag, the <p> tag in this case, has been selected.

To select the child tag:

  • Press Ctrl+Shift+> (Greater Than); on the Mac, it's Command+Shift+> (Greater Than).


    From the menu bar, select Edit > Select Child Tag (Figure 4.46). If there is no child tag inside the selected tag, the tag will simply remain selected.

    Figure 4.46. With the <p> tag selected, I pressed Ctrl+Shift+>, and the child tag (the <font> tag) was selected. This can come in very handy when trying to select links, list items, and blockquotes, as well as font modifications.

Removing a tag

You can also delete tags from within the Document window. Dreamweaver watches your back and won't let you remove some tags; for instance, the <body> tag is required.

To remove a tag:

Click on the object or text affected by the offending tag.

Right-click (Control+click) on the tag in the tag selector in the lower-left corner of the Document window (Figure 4.47).

Figure 4.47. Right-click (Control+click) on the tag in the status bar, and select Remove Tag from the menu that appears.

From the pop-up menu that appears, select Remove Tag. The tag will be deleted (Figure 4.48).

Figure 4.48. The <font> tag that I right-clicked on in Figure 4.47 was removed.

About the Hints Menu

The Hints menu will appear after a few seconds when you open the tag selector. It's a regular old drop-down menu. To select a tag, scroll through the menu using the scrollbars or arrow keys, or type a few letters of the tag, and the menu will scroll down alphabetically. For example, type cen, and the menu will scroll to center. To enter a selection, press Enter (Return), or double-click the entry.

If you pause for a few seconds while editing or entering a tag or an attribute, the Hints menu will come back. The Hints menu will also appear for attributes of a tag if you type a space after the tag.

If you select the name of an attribute, available standard values for that attribute will appear. For example, the tag <td> (table cell) offers several attributes, including align. If you select the align attribute, the Hints menu will offer left, center, and right as available values. On the other hand, another attribute of the <td> tag is bgcolor. If you select that attribute, every code for every color will not appear. You'll have to type the hex code yourself, or save your changes and then select the color using the Property inspector.

To make the Hints menu go away, click the QT editor, press Esc, or just keep typing. If the Hints menu doesn't appear when you want it to, I'm afraid you'll have to close the QT editor and try it again, or just type the tag or attribute.

The Tag Hints menu contents are in a file called TagAttributeList.txt, inside Dreamweaver's Configuration folder. You can add tags, attributes, or values to this file, or you can delete esoteric tags you don't use. Make a backup of this file before you edit it.

To set preferences, see Appendix D on the book's Web site.

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint