Using Code Hints


When it comes to working with HTML, not all text editors are created equallyand Dreamweaver's code hints are one reason why text editor fans will use its Code view rather than someone else's garden variety notepad-like application.

To use code hints:

1.
Click anywhere on the page that you want to add a tag. Start a new tag by typing < , and the code hints appear in a pop-up menu ( Figure 15.26 ).

Figure 15.26. Start typing and the code hints pop-up menu appears.


2.
Type in the first character or two of the tag, and the code hints menu should change to reflect your typing ( Figure 15.27 ). When the hinted value is the tag you want, press Tab.

Figure 15.27. As you continue to type, the code hints narrow down your choices.


3.
To add an attribute to your new tag, press the spacebar and continue to type. The code hints pop-up menu will appear again, this time displaying just the valid attributes for that tag ( Figure 15.28 ). Again, choose the one you want and press Tab to get the full attribute added to your tag.

Figure 15.28. Code hints work for attributes as well as tags.


4.
If you select an attribute that needs to link to a file, the code hint changes to a Browse button ( Figure 15.29 ). Click the button to browse to the file on your disk.

Figure 15.29. Code hints can tell you when the attribute needs a URL as its value.


5.
If you want to add an attribute to an existing tag, click immediately after the tag name (for instance, right after the g in <img ), press the spacebar, and the attributes available will display ( Figure 15.30 ).

Figure 15.30. You can add an attribute to an existing tagjust click inside the tag and start typing.


6.
To end a tag, type </ , and the most recently opened tag will automatically be closed.

Tips

  • If the code hints pop-up menu doesn't appear, press Ctrl-spacebar (Cmd-spacebar for Mac) to make it display.

  • You can use the arrows to move up and down through code hints to choose the tag or attribute you want.

  • If you're using XHTML and you end a tag with > rather than /> , code hints will automatically change it to the proper format.

  • You can't modify an attribute with code hints; instead, delete the attribute and re-create it.

  • If you want a special character but can't remember the exact name of it (such as &nbsp; for non-breaking space), just type in the first ampersand & and you'll get a code hint that lists all the possible characters you can enter.

  • If there's anything you don't like about how code hints work, you can change them to suit your taste by modifying the values in the Code Hints category of Dreamweaver's Preferences ( Figure 15.31 ).

    Figure 15.31. Dreamweaver lets you make code hints work just the way you choose.





Macromedia Dreamweaver 8 for Windows & Macintosh Visual QuickStart Guide
Macromedia Dreamweaver 8 for Windows & Macintosh
ISBN: 0321350278
EAN: 2147483647
Year: 2005
Pages: 239

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net