|
INTERVIEW QUESTIONS
PROGRAMMING LANGUAGES
HTML
DETAILS
Question: How can I include comments in HTML?
Answer: Technically, since HTML is an SGML application, HTML uses SGML comment syntax. However, the full syntax is complex, and browsers don't support it in its entirety anyway. Therefore, use the following simplified rule to create HTML comments that both have valid syntax and work in browsers:
An HTML comment begins with "<!--", ends with "-->", and does not contain "--" or ">" anywhere in the comment. The following are examples of HTML comments:
* <!-- This is a comment. --> * <!-- This is another comment, and it continues onto a second line. --> * <!---->
Do not put comments inside tags (i.e., between "<" and ">") in HTML markup.
|
|
|
Category |
HTML Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 7891 users |
Added on |
9/14/2014 |
Views |
67829 |
Rate it! |
|
|
Question:
How can I include comments in HTML?
Answer:
Technically, since HTML is an SGML application, HTML uses SGML comment syntax. However, the full syntax is complex, and browsers don't support it in its entirety anyway. Therefore, use the following simplified rule to create HTML comments that both have valid syntax and work in browsers:
An HTML comment begins with "<!--", ends with "-->", and does not contain "--" or ">" anywhere in the comment. The following are examples of HTML comments:
* <!-- This is a comment. --> * <!-- This is another comment, and it continues onto a second line. --> * <!---->
Do not put comments inside tags (i.e., between "<" and ">") in HTML markup. Source: CoolInterview.com
The comment in HTML is <!-- Comment text....--> For Java Script comment like c and c++ // Comment text. /* Comment text */ Source: CoolInterview.com
Answered by: sourav | Date: 12/28/2009
| Contact sourav
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All HTML Interview Questions & Answers - Exam Mode /
Learning Mode
|