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 provide information meant solely for other human developers. Computers and processors ignore them during execution.

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

  1. Messages - Primary comments convey code information. 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 remind you of what you are working on. You can write notes to yourself about your work’s goal or how you think you may go about solving a problem.
  3. TODO - Use comments to remind yourself of what tasks you still have left to complete. Widespread use of comments is to place a “TODO: “within your code and simply state what 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 highlight your TODO’s for you to see easily.
  4. Notes - They serve as a way for you to communicate your intentions and critical thought processes to your homework graders and instructor this semester.
  5. Testing - You can turn code snippets on or off by delineating them as comments. This type of debugging is useful when hunting for errors or trying different ways of styling content.

html comment testing