Download 9 Page Layout
Transcript
Code View Figure 10-7: The Coding toolbar lets you wrap HTML, CSS, JavaScript, or other programming code within comment characters. Just select the code you wish to turn into comments, click the Add comment button, and then select the type of comment you wish to add. Use the HTML comment option to hide HTML code; the /* */ option to hide multiple lines of CSS, JavaScript, or PHP code; the // option to hide each line of CSS, JavaScript, or PHP code; the ’ option to hide VBScript code; and, if you’re working on a server-side page as described in Part 6, use the last option to hide code in those pages. To remove a comment, select all of the code (including the comment) and click the Remove comment button (hidden in this figure; it’s just below the Apply Comment button). Code Hints Typing code can be a chore, which is why even longtime hand coders take advantage of anything that helps speed up the process. A perfect example is Dreamweaver’s Code Hints feature (shown in Figure 10-8). It lets you select tags, attributes, and even Cascading Style Sheet styles from a pop-up menu as you type. Note: Code Hints work with other tags as well as scripting languages like ASP.NET, ColdFusion, and PHP. In addition, Dreamweaver includes CSS Code Hints, so if you write your style sheets by hand, you can take advantage of the auto-completion features of Code Hints to quickly type out CSS style properties. Here’s how it works. After you begin a new tag by typing an opening bracket (<), a menu pops up, listing all available HTML tags. Use your mouse or arrow keys to select a tag, or type the first few letters of the tag and let Dreamweaver select the closest matching item. When you press Enter (Return), Dreamweaver automatically fills in the tag name. Even better, a second menu now pops up, listing all the properties of that tag. Chapter 10: Under the Hood: HTML 377