Dreamweaver

Use code hints

The code hints feature helps you insert and edit code quickly and without mistakes. When you type certain characters in Code view, such as the first letters of a tag or attribute or CSS property name, a list appears, suggesting options to complete your entry. You can use this feature to insert or edit code, or just to see the available attributes for a tag, the available parameters for a function, or the available methods for an object.

Code hints are available for a variety of kinds of code. An appropriate list of items appears when you type a particular character that indicates the beginning of a piece of code; for example, to display a code hints list of HTML tag names, type a start bracket (<).

For best results, especially when using code hints for functions and objects, set the Delay option in the Code Hints preferences dialog box to a delay of 0 seconds.

The code hints list disappears when you press Backspace (Windows) or Delete (Macintosh).

Display a code hints menu

 Press Control+Spacebar.

Insert markup or other code in Code view by using code hints

  1. Type the beginning of a piece of code. For example, to insert a tag, type a start bracket ( < ); to insert an attribute, place the insertion point immediately after a tag name and press Spacebar.

    A list of items (such as tag names or attribute names) appears.

    To close the list at any time, press Escape.
  2. Scroll through the list by using the scroll bar or the Up Arrow and Down Arrow keys.
  3. To insert an item from the list, double-click it, or select it and press Enter (Windows) or Return (Macintosh).
    If a recently created CSS style doesn’t appear in a code hints list of CSS styles, select Refresh Style List from the code hints list. If Design view is showing, some invalid code might appear in Design view temporarily after you select Refresh Style List; to remove that invalid code from Design view, after you finish inserting the style, press F5 to refresh Design view again.
  4. To insert a closing tag, type </ (slash).
    Note: By default, Dreamweaver determines what tag needs to be closed and closes it for you. You can change this default behavior so that Dreamweaver inserts a closing tag after you type the final angle bracket (>) of the opening tag, or so that it inserts no closing tag at all. Select Edit > Preferences > Code Hints, and then select one of the Close Tags options.

Edit a tag by using code hints

  • To replace an attribute with a different attribute, delete the attribute and its value, and then add an attribute and its value as described in the previous procedure.

  • To change a value, delete the value, and then add a value as described in the previous procedure.