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

Chapter 38. Working with Source Code in ... > Finding and Changing Code Elements

Finding and Changing Code Elements

You can use the Find Code Elements command to search for particular strings of code in a single document, a selection of documents, or every document in the entire site. Using the Change option you can search and replace code with ease in one dialog box. The Find Code Elements command can come in quite handy when you need to make a global change throughout your site, such as changing the background image for every page or changing the DTD for every page. In a single HTML document, search and replace outdated HTML codes like the <font> tag with cascading style sheet code like the <div> tag:

1.
Regardless of whether you want to search a single file or the entire site (open a single Document window or open the Site window to start), choose Edit, Find, Find Code Elements.

2.
Choose the element and any attributes you want to search for in the top section of the Find Code Elements dialog, as shown in Figure 38.28.

Figure 38.28. The Find Code Elements dialog.


3.
In the Change section of the Find Code Elements dialog, choose Keep if you want to keep the element you're searching for and then set any new attributes you want to apply.

4.
Select where you want to perform the find and change from the Work On pop-up menu in the bottom section of the Find Code Elements dialog.

5.
Click Find All to find all occurrences and display them in the list at the bottom of the Find Code Elements dialog. Click Apply to All to make the change to every document selected in the bottom section.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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