w7r.blogspot.com
Who Would Waste Their Time Commenting their HTML???
Turns out, not too many people comment their HTML code, which is a shame because it causes a hellish amount of problems for website and program developers alike. If you have never heard of a 'comment' then no need to worry. A comment is literally a.. COMMENT; however, the comment acts as notes to you and other web developers as to what the code in a specific region does.
An Example of Practical HTML Commenting
Blogger templates provide beautiful website designs that have already been coded for you; however, when a blogger such as myself wants to make changes to the Template code, I have to dig into the source code for my template (which is a MESS). Blogger template codes are usually an eye-sore, so to make my template easier to maintain and tweak I labeled the different segments of my blog code with HTML comments.
For example, I label my additions of code into the template by placing a a line before the content I wrote. None of the comment will be displayed on the blog.
For example, I label my additions of code into the template by placing a a line before the content I wrote. None of the comment will be displayed on the blog.
Real HTML Comment Samples
|
SupremeGreatGoodParagraph 1 Paragraph 2 |
What To Remember!
- HTML format for a comment is <!-- this is a comment -->
- Comments are a concept that is much larger than HTML is itself. ALL PROGRAMMING LANGUAGES IMPLEMENT WAYS TO COMMENT!!!
- Comments are programmers notes
- Using comments in HTML saves you hours of time on large projects and website designs
- Comments can span multiple lines and contain any characters you desire!
- Incorrect Syntax of a comment could reveal your comment to your website visitors
No comments:
Post a Comment