|
Using Find and Replace in the Source Code
Dreamweaver's Find and Replace is powerful tool you
can use to search for text in the source code and to make changes to that
text within the document you are working on, within selected documents, or
throughout your website. The search takes you in to the code and stops at
each occurrence of the text specified, this will include meta tags if
appropriate.
This document discusses how to find and replace text within
source code and uses the example of changing the Alt tag of an image to make
it more descriptive.
The Replace feature is useful when you want to
change the same piece of information (text or tags) throughout a
document(s). Use it to replace each occurrence of the information
individually. Clicking FIND NEXT will advance to and review subsequent
occurrences.
WARNING:
Use the Replace All option with caution! This option will replace
your specified information throughout an entire document(s).
-
From the Edit menu, select Find and
Replace...
OR
Press [Ctrl + [F]
The Find and Replace dialog box appears.
-
From the Find In pull-down list, select an area to
search
For a description of these options, see
Where You Can Search: Find In Options.
EXAMPLE: Select
Current Document
-
From the Search For pull-down list, select
Source Code
-
In the Search For text box, type the text you are
searching for
NOTE: It is not necessary to
include the tag or attribute, but doing so will help refine your search.
EXAMPLE: Type
alt="UWEC Bldg"
-
In the Replace With text box, type the replacement
text
EXAMPLE: Type
alt="Photo: Schofield Hall"
-
OPTIONAL:
From the list of options, select options appropriate to your search
EXAMPLE: Select
Ignore Whitespace Differences
-
Click FIND NEXT
If you are not working in either the Show Code or Show Code
and Design view, a separate window opens and displays the code for
your page. The first occurrence of the information searched for is
identified within the code.
EXAMPLE: Continue clicking
FIND NEXT until you see UWEC Bldg within the Alt tag of the
image.
-
Click REPLACE or REPLACE ALL
Use the Replace option to replace each occurrence of the
information individually. Clicking FIND NEXT will advance to and review
subsequent occurrences.
WARNING: Use the Replace
All option with caution! This option will replace your specified
information throughout the entire document(s).
EXAMPLE: Click
REPLACE
-
To close the Find and Replace dialog box, click
CLOSE
The old text is replaced with the new.
Using Find Next
Within a given document, Dreamweaver will remember your last
search. So, if you close the Find and Replace dialog box to do
additional editing, you can resume your search using Find Next.
This does not invoke the Find and Replace dialog box, it simply
locates the next occurrence of the information previously searched.
-
From the Edit menu, select Find Next
OR
Press [F3]
|