Leaving Messages and Notes in HTML

Before we get too far, did you know you can leave notes for yourself inside your code as you work?

Comments in code allow developers to leave information that is for other human developers only. Computers and processors ignore comments in code.

Let’s go over a few reasons why you may want to include comments in your code.

  1. Messages - Primary comments convey information about code. Typically, this means why some code was written in a certain way, or may also point out information to those collaborating on code together.
  2. Reminders - Comments can be used to remind you want you are working on. You may make notes to yourself about the goal of your work or how you think you may go about solving a problem.
  3. TODO - Comments can be used to remind you what else you have to do. A very common use of comments is to place “TODO: “ within your code along with what it is you still need to to do. There are even packages from editors, such as Atom, that can show you a list of your remaining TODO’s in a project or simply highlight your TODO’s for you to easily see.
  4. Notes - They are a way for you to communicate intention and thought to the your homework graders this semester.
  5. Testing - You can turn code snippets on or off by delineating them as comments. This is useful when hunting for errors or trying different ways of styling content.

html comment testing