HTML: Comments

At this point your HTML source code is not that complex. Not meaning that it will get more complex, only that your page structure is very basic. You don't have navigation areas, headers, footers, content and sub-content areas setup. When you get to that point you will find the use of comments added within your code quite valuable. Comments explain things in the source code that are noit actually visible on the web page itself.

Most programming languages allow for the addition of comments within the code to help identify structural components within the code and/or to help you or another person understand what that part of the code is for. This is quite important when developing a site as part of a team or to remind yourself what you were thinking when you come back to edit a page, perhaps months later.

Here is how we add a comment within the source code:

<!-- The text here is the comment -->

I can't show you what this looks like here, as comments don't display on the page, only within the source code. View the source for this page and see if you can locate a comment tag that commends you for finding it!

 


modifed: 2009-09-29
Google
web www.digitalvertebrae.com
Exercises
The exercises for this week are listed below and available in PDF or MS Word formats.
HTML - Trying it Out
HTML - Creating Lists
HTML - Creating a Simple Web Page
 
©2009 Web Site Development: an introduction