Browsers run fine without your comments, but for any continued development??”of the Web page or of
yourself as a Webmaster??”commenting your code is extremely beneficial. Sometimes, as in a corporate setting,
Web pages are co-developed by teams of designers and programmers. In this situation, commenting
your code may not just be a good idea; it may be required. An HTML comment looks like the following:
You??™re not restricted to any particular line length or number of lines for comments. The text included
between the opening of the comment, , can span regular paragraphs or HTML
code. In fact, one of the most common uses for comments during the testing and debugging phase of page
design is to comment out sections of code as a means of tracking down an elusive bug.
To insert a comment in Dreamweaver, first place your cursor in either the Document window or the Code
inspector where you want the comment to appear. Then click the Comment button in the Common category
of the Insert bar. This sequence opens the Comment dialog box, where you can type the desired text;
click OK when you??™ve finished. Figure 8-22 shows a completed comment in Design and Code views, with
the corresponding Property inspector open.
Pages:
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619