Share via


Find and replace tags

The Find and Replace dialog box enables you to locate a specified tag in one or more web pages or in all pages in your website. You can specify the direction to look in the page, and set basic or advanced search criteria.

When tags are found, you can replace or delete the tag and its content, replace only the content, add content after or before the tag, or set an attribute.

Tip

You can use the Code View toolbar or Code View submenu on the Edit menu to quickly locate the end tag or curly brace (}) for a start tag or vice versa. For more information, see Select code. You can use the Apply Styles task pane to locate every application of a particular style in a web page. For more information, see Apply Styles task pane.

To find and replace HTML tags in a single page

  1. On the Edit menu, click either Find or Replace.

  2. In the Find and Replace dialog box, on the HTML Tags tab, do the following:

    Use this

    To do this

    Find tag

    Type or select the tag you want to find.

    Cc295337.alert_note(en-us,Expression.10).gifNote:
    If additional options appear to the right of the Find tag box, type or select options that further define how you want to replace the tags.

    Replace action

    Click the action you want.

    Cc295337.alert_note(en-us,Expression.10).gifNote:
    If additional options appear to the right of the Replace action box, type or select options that further define how you want to replace the tags.

    HTML Rules

    If you want to find only tags that meet certain criteria that you specify, set the rules you want in the HTML Rules dialog box. For more information, see Set HTML rules for finding text.

    Search options

    Click the options that you want.

  3. Do one of the following:

    • To find one instance at a time, click Find Next.

      The next instance is selected in the page in both Design view and Code view.

    • To find all instances all at once, click Find All.

      The search results appear in the Find task pane.

  4. Do one of the following:

    • To go to the next instance, in the Find and Replace dialog box, click Find Next.

    • If you clicked Find All, in the Find task pane, to open and then go to the instance in the page, either double-click a row or right-click a row and click the Go to Page button Cc295337.18f213fe-3e08-4e2a-8636-77f8ad816a39(en-us,Expression.10).gif. To replace the current instance, in the Find task pane, click the Find and Replace button Cc295337.48d27529-a669-464e-9bd3-e5887762c48a(en-us,Expression.10).gif to open the Find and Replace dialog box.

    • To replace the text, in the Find and Replace dialog box, in the Replace tab, in the Replace with box, type the text you want to replace the found text, and then do one of the following:

      To replace the current instance, in the Replace tab, click Replace.

      To replace all occurrences of the text, in the Replace tab, click Replace All.

To find and replace HTML tags in multiple pages

  1. Do one of the following:

    • Open the pages that you want to search.

    • In the Folder List task pane or the Web Site window, select the pages that you want to search.

    • Open the site you want to search.

  2. On the Edit menu, click either Find or Replace.

  3. In the Find and Replace dialog box, on the HTML Tags tab, do the following:

    Use this

    To do this

    Find tag

    Type or select the tag you want to find.

    Cc295337.alert_note(en-us,Expression.10).gifNote:
     If additional options appear to the right of the Find tag box, type or select options that further define how you want to replace the tags.

    Replace action

    Click the action you want.

    Cc295337.alert_note(en-us,Expression.10).gifNote:
     If additional options appear to the right of the Replace action box, type or select options that further define how you want to replace the tags.

    HTML Rules

    If you want to find only tags that meet certain criteria that you specify, set the rules you want in the HTML Rules dialog box. For more information, see Set HTML rules for finding text.

    Search options

    Click the options that you want.

  4. Click Find All.

    The search results appear in the Find task pane.

  5. Do one of the following:

    • To go to the next instance, in the Find and Replace dialog box click Find Next.

    • To open and then go to the instance in the page, in the Find task pane, either double-click a row or right-click a row and click Go to Page.

    • To replace the current instance of the text, in the Find and Replace dialog box, in the Replace tab, in the Replace with box, type the text you want to replace the found text, and then click Replace.

    • To replace all instances of the text, in the Find and Replace dialog box, in the Replace tab, in the Replace with box, type the text you want to replace the found text, and then click Replace All.

See also

Concepts

Find and replace text and code

Set HTML rules for finding text

Regular expressions for finding text

Use the thesaurus

Go to a specific line of code

Go to a hyperlink or bookmark (HTML anchor)