Debugging

Comments are great for debugging HTML, because you can comment out specific HTML lines of code, one at a time, to search for errors:

HTML file: Displayed by browser:
<p>The picnic was a success and a good time had by all.</p>

<!-- WHY WON'T THIS IMAGE DISPLAY?
<img border="0" src="pic_mountain.jpg" alt="Mountain">
                    END OF COMMENT-->

<p>This was a wonderful idea!</p>

The picnic was a success and a good time had by all.

This was a wonderful idea!

I know that it is considered "rude" and "yelling," but I prefer to use all uppercase letters for my comments because they stand out more.

Back buttonTable of ContentsNext button