You can leave notes in the source document for yourself and others by marking them up as comments. Anything you put between comment tags


will not display in the browser and will not have any effect on the rest of the source.



Comments are useful for labelling and organizing long documents, particularly when they are shared by a team of developers. In this example, comments are used to point out the section of the source that contains the navigation.


  • ...

Bear in mind that although the browser will not display comments in the web page, readers can see them if they “view source,” so be sure that the comments you leave are appropriate for everyone. It’s probably a good idea just to strip out notes to your fellow developers before the site is published. It cuts some bytes off the file size as well.

HTML5 2016-06-13View: 1262

Categories: HTML5

Comments

Leave a comment