Note:

The user interface has been simplified in Dreamweaver CC and later. As a result, you may not find some of the options described in this article in Dreamweaver CC and later. For more information, see this article.

Add text to a document

To add text to a Dreamweaver document, you can type text directly in the Document window, or you can cut and paste text. You can also import text from other documents.

When you paste text into a Dreamweaver document, you can use either the Paste or the Paste Special command. The Paste Special command lets you specify the format of pasted text in different ways. For example, if you wanted to paste text from a formatted Microsoft Word document into your Dreamweaver document, but wanted to strip out all of the formatting so that you could apply your own CSS style sheet to the pasted text, you could select the text in Word, copy it to your Clipboard, and use the Paste Special command to select the option that lets you paste text only.

When using the Paste command to paste text from other applications, you can set paste preferences as default options.

Note:

Control+V (Windows) and Command+V (Macintosh) always paste text only (no formatting) in Code view.

  • Add text to your document by doing one of the following:
    • Extract text from your PSD compositions using the Extract panel. For detailed information, see Copy text from PSD files.
    • Type text directly into the Document window.
    • Copy text from another application, switch to Dreamweaver, position the insertion point in the Design view of the Document window, and select Edit > Paste or Edit > Paste Special.

    When you select Edit > Paste Special, you can select several paste formatting options.

    You can also paste text using the following keyboard shortcuts:

     

    Paste option

    Keyboard shortcut

    Paste

    Control+V (Windows)

    Command+V (Macintosh)

    Paste Special

    Control+Shift+V (Windows)

    Command+Shift+V (Macintosh)

     

Insert special characters

Certain special characters are represented in HTML by a name or a number, referred to as an entity. HTML includes entity names for characters such as the copyright symbol (©), the ampersand (&), and the registered-trademark symbol (®). Each entity has both a name (such as —) and a numeric equivalent (such as —).

Note:

HTML uses the angle brackets <> in its code, but you may need to express the special characters for greater than or less than without Dreamweaver interpreting them as code. In this case, use &gt; for greater than (>) and &lt; for less than (<).

Unfortunately, many older browsers don’t properly display many of the named entities.

  1. In the Document window, place the insertion point where you want to insert a special character.
  2. Do one of the following:
    • Select the name of the character from the Insert > HTML > Special Characters submenu.

    • In the Text category of the Insert panel, click the Characters button and select the character from the submenu.

    Note:

    There are many other special characters available; to select one of them, select Insert > HTML > Special Characters > Other or click the Characters button in the Text category of the Insert panel and select the Other Characters option. Select a character from the Insert Other Character dialog box, and click OK.

Add space between characters

HTML only allows for one space between characters; to add additional space in a document you must insert a non-breaking space. You can set a preference to automatically add non-breaking spaces in a document.

Insert a non-breaking space

  • Do one of the following:
    • Select Insert > HTML > Special Characters > Non-Breaking Space.

    • Press Control+Shift+Spacebar (Windows) or Option+Spacebar (Macintosh).

    • In the Text category of the Insert panel, click the Characters button and select the Non-Breaking Space icon.

Set a preference to add non-breaking spaces

  1. Select Edit > Preferences (Windows) or Dreamweaver > Preferences (Macintosh).
  2. In the General category make sure Allow Multiple Consecutive Spaces is checked.

Add paragraph spacing

Dreamweaver works similarly to many word processing application: you press Enter (Windows) or Return (Macintosh) to create a new paragraph. Web browsers automatically insert a blank line of space between paragraphs. You can add a single line of space between paragraphs by inserting a line break.

Add a paragraph return

  • Press Enter (Windows) or Return (Macintosh).

Add a line break

  • Do one of the following:
    • Press Shift+Enter (Windows) or Shift+Return (Macintosh).

    • Select Insert > HTML > Special Characters > Line Break.

    • In the Text category of the Insert panel, click the Characters button and select the Line Break icon.

Create bulleted and numbered lists

You can create numbered (ordered) lists, bulleted (unordered) lists, and definition lists from existing text or from new text as you type in the Document window.

Definition lists do not use leading characters like bullet points or numbers and are often used in glossaries or descriptions. Lists can also be nested. Nested lists are lists that contain other lists. For example, you might want an ordered or bulleted list nested within another numbered or ordered list.

You use the List Properties dialog box to set the appearance of an entire list or for an individual list item. You can set number style, reset numbering, or set bullet style options for individual list items or for the entire list.

Create a new list

  1. In the Dreamweaver document, place the insertion point where you want to add a list, then do one of the following:
    • In the HTML Property inspector, click either the Bulleted or Numbered List button.

    • Select Format > List and select the type of list desired—Unordered (bulleted) List, Ordered (numbered) List, or Definition List.

      The leading character for the specified list item appears in the Document window.

  2. Type the list item text, then press Enter (Windows) or Return (Macintosh) to create another list item.
  3. To complete the list, press Enter twice (Windows) or press Return twice (Macintosh).

Create a list using existing text

  1. Select a series of paragraphs to make into a list.
  2. In the HTML Property inspector, click the Bulleted or Numbered List button, or select Format > List and select the type of list desired—Unordered List, Ordered List, or Definition List.

Create a nested list

  1. Select the list items you want to nest.
  2. In the HTML Property inspector, click the Blockquote button, or select Format > Indent.

    Dreamweaver indents the text and creates a separate list with the original list’s HTML attributes.

  3. Apply a new list type or style to the indented text by following the same procedure used above.

Set list properties for an entire list

  1. In the Document window, create at least one list item. The new style will automatically apply to additional items you add to the list.
  2. With the insertion point in the list item’s text, select Format > List > Properties to open the List Properties dialog box.
  3. Set the options you want to define the list:

    List Type

    Specifies list properties while List Item specifies an individual item in a list. Use the pop‑up menu to select a bulleted, numbered, directory, or menu list. Depending on the List Type you select different options appear in the dialog box.

    Style

    Determines the style of numbers or bullets used for a numbered or bulleted list. All items in the list will have this style unless you specify a new style for items within the list.

    Start Count

    Sets the value for the first item in a numbered list.

  4. Click OK to set the choices.

Set list properties for a list item

  1. In the Document window, place the insertion point in the text of a list item you want to affect
  2. Select Format > List > Properties.
  3. Under List Item, set the options you want to define:

    New Style

    Specifies a style for the selected list item. Styles in the New Style menu are related to the type of list displayed in the List Type menu. For example, if the List Item menu displays Bulleted List, only bullet options are available in the New Style menu.

    Reset Count To

    Sets a specific number from which to number list item entries.

  4. Click OK to set the options.

Search for and replace text

You can use the Find And Replace command to search for text and for HTML tags and attributes in a document or a set of documents. The Search panel, in the Results panel group, shows the results of a Find All search.

Note:

To search for files in a site, use different commands: Locate In Local Site and Locate In Remote Site.

Search for and replace text

  1. Open the document to search in, or select documents or a folder in the Files panel.
  2. Select Edit > Find And Replace.
  3. Use the Find In option to specify which files to search:

    Selected Text

    Confines the search to the text that’s currently selected in the active document.

    Current Document

    Confines the search to the active document.

    Open Documents

    Searches all documents that are currently open.

    Folder

    Confines the search to a specific folder. After choosing Folder, click the folder icon to browse to and select a folder to search.

    Selected Files In Site

    Confines the search to the files and folders that are currently selected in the Files panel.

    Entire Current Local Site

    Expands the search to all the HTML documents, library files, and text documents in the current site.

  4. Use the Search pop‑up menu to specify the kind of search you want to perform:

    Source Code

    Searches for specific text strings in the HTML source code. You can search for specific tags using this option, but the Specific Tag search provides a more flexible approach to searching for tags.

    Text

    Searches for specific text strings in the text of the document. A text search ignores any HTML that interrupts the string. For example, a search for the black dog would match both the black dog and the <i>black</i> dog.

    Text (Advanced)

    Searches for specific text strings that are either within or not within a tag or tags. For example, in a document that contains the following HTML, searching for tries and specifying Not Inside Tag and the i tag would find only the second instance of the word tries: John <i>tries</i> to get his work done on time, but he doesn’t always succeed. He tries very hard. .

    Specific Tag

    Searches for specific tags, attributes, and attribute values, such as all td tags with valign set to top.

    Note:

    Pressing Control+Enter or Shift+Enter (Windows), or Control+Return, Shift+Return, or Command+Return (Macintosh), adds line breaks within the text search fields, allowing you to search for a Return character. When performing such a search, deselect the Ignore Whitespace Differences option if you’re not using regular expressions. This search finds a Return character in particular, not simply the occurrence of a line break; for instance, it doesn’t find a tag or a tag. Return characters appear as spaces in the Design view, not as line breaks.

  5. Use the following options to expand or limit the search:

    Match Case

    Limits the search to text that exactly matches the case of the text you want to find. For example, if you search for the brown derby, you will not find The Brown Derby.

    Ignore Whitespace

    Treats all whitespace as a single space for the purposes of matching. For example, with this option selected, this text would match this text and this      text but not thistext. This option is not available when the Use Regular Expressions option is selected; you must explicitly write your regular expression to ignore whitespace. Note that <p> and <br> tags do not count as whitespace.

    Match Whole Word

    Limits the search to text that matches one or more complete words.

    Note:

    Using this option is equivalent to doing a regular-expression search for a search string that starts and ends with \b, the word-boundary regular expression.

    Use Regular Expressions

    Causes certain characters and short strings (such as ?, *, \w, and \b) in your search string to be interpreted as regular expression operators. For example, a search for the b\w*\b dog will match both the black dog and the barking dog.

    For more information on using regular expressions in Find and Replace, read this article.

    Note:

    If you are working in Code view and make changes to your document, and try to find and replace anything other than source code, a dialog box appears letting you know that Dreamweaver is synchronizing the two views before doing the search.

  6. To search without replacing, click Find Next or Find All:

    Find Next

    Jumps to and selects the next occurrence of the search text or tags in the current document. If there are no more instances of the tag in the current document, Dreamweaver proceeds to the next document, if you are searching in more than one document.

    Find All

    Opens the Search panel in the Results panel group. If you are searching a single document, Find All displays all occurrences of the search text or tags, with some surrounding context. If you are searching a directory or site, Find All displays a list of documents that contain the tag.

  7. To replace found text or tags, click Replace or Replace All.
  8. When you’re finished, click Close.

Search again without displaying the Find And Replace dialog box

  • Press F3 (Windows) or Command+G (Macintosh).

View a particular search result in context

  1. Select Window > Results to display the Search panel.
  2. Double-click a line in the Search panel.

    If you’re searching the current file, the Document window displays the line containing that search result.

    If you’re searching a set of files, the file containing that search result opens.

Perform the same search again

  • Click the Find And Replace button.

Stop a search in progress

  • Click the Stop button.

Search for a specific tag

Use the Find And Replace dialog box to search for text or tags in a document, and to replace the found material with other text or tags.

  1. Select Edit > Find And Replace.
  2. In the Search pop‑up menu, select Specific Tag.
  3. Select a specific tag or [any tag] from the pop‑up menu next to the Search pop‑up menu, or type a tag name in the text box.
  4. (Optional.) Limit the search with one of the following tag modifiers:

    With Attribute

    Specifies an attribute that must be in the tag for it to match. You can specify a particular value for the attribute or select [any value].

    Without Attribute

    Selects an attribute that must not be in the tag for it to match. For example, select this option to search for all img tags with no alt attribute.

    Containing

    Specifies text or a tag that must be contained within the original tag for it to match. For example, in the code <b><font size="4">heading 1</font></b>, the font tag is contained within the b tag.

    Not Containing

    Specifies text or a tag that must not be contained within the original tag for it to match.

    Inside Tag

    Specifies a tag that the target tag must be contained in for it to match.

    Not Inside Tag

    Specifies a tag that the target tag must not be contained in for it to match.

  5. (Optional.) To limit the search further, click the Plus (+) button and repeat step 3.
  6. If you didn’t apply any tag modifiers in steps 3 and 4, then click the Minus (-) button to remove the tag modifiers pop‑up menu.
  7. If you want to perform an action when the tag is found (such as removing or replacing the tag), select the action from the Action pop‑up menu and, if applicable, specify any additional information necessary to perform the action.

Search for specific text (Advanced)

Use the Find and Replace dialog box to search for text or tags in a document, and to replace the found material with other text or tags.

  1. Select Edit > Find and Replace.
  2. In the Search pop‑up menu, select Text (Advanced).
  3. Enter text in the text field adjacent to the Search pop‑up menu.

    For example, type the word Untitled.

  4. Select Inside Tag or Not Inside Tag, and then select a tag from the adjacent pop‑up menu.

    For example, select Inside Tag and then title.

  5. (Optional.) Click the Plus (+) button to limit the search with one of the following tag modifiers:

    With Attribute

    Specifies an attribute that must be in the tag for it to match. You can specify a particular value for the attribute or select [any value].

    Without Attribute

    Selects an attribute that must not be in the tag for it to match. For example, select this option to search for all img tags with no alt attribute.

    Containing

    Specifies text or a tag that must be contained within the original tag for it to match. For example, in the code <b><font size="4">heading 1</font></b>, the font tag is contained within the b tag.

    Not Containing

    Specifies text or a tag that must not be contained within the original tag for it to match.

    Inside Tag

    Specifies a tag that the target tag must be contained in for it to match.

    Not Inside Tag

    Specifies a tag that the target tag must not be contained in for it to match.

  6. (Optional.) To limit the search further, repeat step 4.

Define abbreviations and acronyms

HTML provides tags that let you define the abbreviations and acronyms you use in your page for search engines, spell checkers, language translation programs, or speech synthesizers. For example, you might want to specify that the abbreviation ME in your page stands for mechanical engineer, or the acronym WHO stands for World Health Organization.

  1. Select the abbreviation or acronym in the text of your page.
  2. Select Insert > HTML > Text Objects > Abbreviation, or Insert > HTML > Text Objects > Acronym.
  3. Enter the full text of the acronym or abbreviation.
  4. Enter the language, such as en for English, de for German, or it for Italian.

Set copy and paste preferences

You can set special paste preferences as default options when using Edit > Paste to paste text from other applications. For example, if you always want to paste text as text only, or text with basic formatting, you can set the default option in the Copy/Paste Preferences dialog box.

Note:

When you paste text into a Dreamweaver document, you can use either the Paste or the Paste Special command. The Paste Special command lets you specify the format of pasted text in different ways. For example, if you wanted to paste text from a formatted Microsoft Word document into your Dreamweaver document, but wanted to strip out all of the formatting so that you could apply your own CSS style sheet to the pasted text, you could select the text in Word, copy it to your Clipboard, and use the Paste Special command to select the option that lets you paste text only.

Note:

Preferences set in the Copy/Paste Preferences dialog box apply only to material pasted into Design view.

  1. Select Edit > Preferences (Windows) or Dreamweaver Preferences (Macintosh).
  2. Click the Copy/Paste category.
  3. Set the following options and click OK.

    Text Only

    Lets you paste unformatted text. If the original text is formatted, all formatting, including line breaks and paragraphs, will be removed.

    Text With Structure

    Lets you paste text that retains structure, but does not retain basic formatting. For example, you can paste text and retain the structure of paragraphs, lists, and tables, without retaining bold, italics, and other formatting.

    Text With Structure Plus Basic Formatting

    Lets you paste both structured and simple HTML-formatted text (e.g., paragraphs and tables, as well as text formatted with the b, i, u, strong, em, hr, abbr, or acronym tag).

    Text With Structure Plus Full Formatting

    Lets you paste text that retains all structure, HTML formatting, and CSS styles.

    Note:

    The Full Formatting option cannot retain CSS styles that come from an external style sheet, nor can it retain styles if the application from which you are pasting does not retain styles upon pasting to the Clipboard.

    Retain Line Breaks

    Lets you keep line breaks in pasted text. This option is disabled if you have selected Text Only.

    Clean Up Word Paragraph Spacing

    Select this option if you selected Text With Structure or Text With Structure Plus Basic Formatting, and want to eliminate extra space between paragraphs when you paste your text.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy