Fixed typos and grammar. Added a new line. (#25709)
Fixed a couple of typos and grammatical errors. Added a new line explaining the importance of clear and concise comments throughout your code.
This commit is contained in:
committed by
Randell Dawson
parent
7342084a3a
commit
cf473d5bb1
@ -5,7 +5,8 @@ title: Comments in HTML
|
||||
|
||||
The comment tag is an element used to leave notes, mostly related to the project or the website. This tag is frequently used to explain something in the code or leave some recommendations about the project. The comment tag also makes it easier for the developer to come back and understand the code he's written at a later stage. Comments can also be used for commenting out lines of code for debugging purposes.
|
||||
|
||||
It is a good practice to add comments to your code, especially when working with a team or at a company.
|
||||
|
||||
It is good practice to add comments to your code, especially when working with a team or at a company. It is also important that you write clear and concise comments that another developer could easier understand.
|
||||
|
||||
Comments are started with `<!--` and ended with `-->`, and can span multiple lines. They can contain code or text, and won't appear on the front-end of the website when a user visits a page. You can view comments through the Inspector Console, or by viewing Page Source.
|
||||
|
||||
@ -30,9 +31,9 @@ Comments are started with `<!--` and ended with `-->`, and can span multiple lin
|
||||
```
|
||||
## Conditional Comments
|
||||
|
||||
Conditional Comments defines some HTML tags to be executed when a certain condition is fulfilled.
|
||||
Conditional Comments define some HTML tags to be excuted when a certain codition is fulfilled.
|
||||
|
||||
Conditional Comments are only recognized by Internet Explorer Version 5 through Version 9 (IE5 - IE9).
|
||||
Conditional Comments are only recognized by Internet Explorer Version 5 through to Version 9 (IE5 - IE9).
|
||||
|
||||
### Example
|
||||
```html
|
||||
@ -49,8 +50,7 @@ Conditional Comments are only recognized by Internet Explorer Version 5 through
|
||||
|
||||
### IE Conditional Comments
|
||||
|
||||
These comments are only available in Internet Explorer and can be used up to IE9. In current times, there is a good chance you will never see them, but it is good to know about their existence as they do exist on some older sites. Conditional Comments are a way to serve a different experience for different client browsers. For example:
|
||||
|
||||
These comments are only available in Internet Explorer and can be used up to IE9. In the current times, there is a good chance you will never see them, but it is good to know about their existence. Conditional Comments are a way to serve a different experience for different client browsers. For example:
|
||||
|
||||
```html
|
||||
<!--[if lt IE 9]> <p>Your browser is lower then IE9</p> <![endif]-->
|
||||
|
Reference in New Issue
Block a user