HTML comments can be useful to help you locate elements when debugging.
When you copy an HTML comment from browser elements inspector, you can paste that comment onto code editor search box to search for that particular part.
It is different than copying an HTML element tag which will copy both the tag and the subtree.
Comments for Navigation
For a code navigation comment, you would want it to describe the element it represent in a single line with unique description.
To help you recognize a comment that is used for code navigation, try using a hashtag prefix.
html |
---|
<!-- # navbar header --> |
If you need to, you can always add additional info right after it.
html |
---|
<!-- # navbar header --> <!-- Multiline comment to provide additional information for this section. --> |
HTML Comments for Code Navigation
HTML comments can be useful to help you locate elements when debugging.
When you copy an HTML comment from browser elements inspector, you can paste that comment onto code editor search box to search for that particular part.
It is different than copying an HTML element tag which will copy both the tag and the subtree.
Comments for Navigation
For a code navigation comment, you would want it to describe the element it represent in a single line with unique description.
To help you recognize a comment that is used for code navigation, try using a hashtag prefix.
html |
---|
<!-- # navbar header --> |
If you need to, you can always add additional info right after it.
html |
---|
<!-- # navbar header --> <!-- Multiline comment to provide additional information for this section. --> |
Comments
Post a Comment