HTML 5 Programming and Web development/HTML 5 Comments: Difference between revisions
Jump to navigation
Jump to search
[unreviewed revision] | [checked revision] |
Content deleted Content added
Tags: Mobile edit Mobile web edit |
Better grammar Tag: 2017 source edit |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
A comment in HTML is an area of text that ignored by the browser.In an HTML comment,you can write anything These are some examples of comment. |
A comment in HTML is an area of text that is ignored by the browser. In an HTML comment, you can write anything. These are some examples of comment. |
||
< |
<syntaxhighlight lang="html5"> |
||
<!--This is a comment--> |
<!-- This is a comment --> |
||
<!--I love HTML--> |
<!-- I love HTML --> |
||
<!--London bridge is burning down> |
<!-- London bridge is burning down --> |
||
</syntaxhighlight> |
|||
</source> |
|||
Comments written in angle brackets with an exclamation mark at the start followed by two hyphens(minus sign) and ending with two hyphens. |
Comments written in angle brackets with an exclamation mark at the start followed by two hyphens (minus sign) and ending with two hyphens. |
||
=Reasons for comments= |
=Reasons for comments= |
||
Comments in HTML are conventionally used as |
Comments in HTML are conventionally used as: |
||
*A directive to show viewers of the source code what it does |
*A directive to show viewers of the source code what it does |
||
*To insert |
*To insert information about the document that viewers of the source code should know such as license and author's information |
||
{{BookCat}} |
Latest revision as of 08:37, 26 February 2022
A comment in HTML is an area of text that is ignored by the browser. In an HTML comment, you can write anything. These are some examples of comment.
<!-- This is a comment -->
<!-- I love HTML -->
<!-- London bridge is burning down -->
Comments written in angle brackets with an exclamation mark at the start followed by two hyphens (minus sign) and ending with two hyphens.
Reasons for comments
[edit | edit source]Comments in HTML are conventionally used as:
- A directive to show viewers of the source code what it does
- To insert information about the document that viewers of the source code should know such as license and author's information