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

Chapter 4. Editing Code > Selecting Parent and Child Tags

Selecting Parent and Child Tags

You can toggle from a tag you've selected with the QT editor to its immediate surrounding tag, called the parent tag (Figure 4.61), 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, but you can't switch tags with the Edit Tag dialog box open.

Figure 4.61. You can see in the Tag selector that there are seven tags surrounding my link (including the <body> tag).

These commands work in Design view. They are designed to allow you to click or drag on some text to select it, and then use quick key commands to select part of the text, such as a link or a piece of boldface text, or to select more of the text, such as an entire paragraph or table row.

To select the parent tag

  • Press Ctrl+[ ; on the Mac, it's Command+[.


    From the menu bar, select Edit > Select Parent Tag.

    Either way, the parent tag will become selected (Figure 4.62).

    Figure 4.62. If I click within my link and repeatedly press Ctrl+[, I can scroll through all the parent tags. I pressed the command three times to select the <p> paragraph tag.

To select the child tag

  • Press Ctrl+]; for Mac, it's Command+Shift+]. This command works only in Design view.


    From the menu bar, select Edit > Select Child.

    Either way, the child tag (the tag next-closest to your text) will become selected (Figure 4.63). If there is no child tag inside the selected tag, the tag will simply remain selected.

    Figure 4.63. With the <p> tag selected, I pressed Ctrl+], 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 text modifications and table components.

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 (Ctrl+click) on the tag in the Tag selector in the lower-left corner of the Document window (Figure 4.64).

Figure 4.64. Right-click (Ctrl+click) on the tag in the Tag selector, 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.65).

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

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