Is Commenting Good? Chapter 2

Comments
Chapter 2
(This unit will cover the important use of commenting)

Till now you have learned a lot about writing codes. It’s easy for you to understand your written codes but what if someone else has to read / understand your code. It will be a complex task to understand what exactly the single line of code is doing.

To make this task easy we use comment feature. Below is detailed description about:
  • What are comments?
  • Why they are important?
  • How to use them?
What are comments?
Comments are Simple Human Readable Descriptions that you write inside any Code, specifying what that Code is doing at that particular line.

Through use of comments in your code, you can add notes in your programming code just to remind what that line-of-code means in future. Browsers do not display comments. They are just useful information for you and others.

Why they are important?
If any program is well commented then finding bugs inside that code or the maintenance of that code is very easy.

Apart from these use, commenting any program makes its more readable and understandable for other programmers who are working on your code. Any programmer can utilize your previous piece of codes into new program just by simply reading the comments.

How to use them?
To make any line into a comment we have to write within <! -- YOUR COMMENTS -->


Commenting a line starts with <! -- and ends with  - ->

Learn_Free_HTML_For_Freshers_Get Jobs_Delhi
Example of Commenting in HTML

For any query related to this topic,please leave comment.

Do not spam as it will be removed.

0 comments:

Post a Comment