1 00:00:00,890 --> 00:00:05,470 Developers use comments in their code to make parts of it easier to understand. 2 00:00:05,470 --> 00:00:08,900 HTML lets you write comments in the code that are ignored by the browser. 3 00:00:08,900 --> 00:00:11,410 So if you're revisiting your code after several months, 4 00:00:11,410 --> 00:00:15,150 comments can help you remember what different parts of your code do. 5 00:00:15,150 --> 00:00:18,070 Or if another developer is viewing your code for the first time, 6 00:00:18,070 --> 00:00:20,960 it will help them to quickly understand how your code works. 7 00:00:20,960 --> 00:00:27,270 So comment tags in HTML begin with a less than symbol followed by an exclamation 8 00:00:27,270 --> 00:00:32,940 mark and two dashes and they end with two dashes and a greater than sign. 9 00:00:32,940 --> 00:00:35,010 And everything between the opening and 10 00:00:35,010 --> 00:00:38,530 closing characters is ignored by the browsers. 11 00:00:38,530 --> 00:00:44,760 Comments are frequently used to indicate where sections of a page start and end. 12 00:00:44,760 --> 00:00:49,544 So, for example, here I can write that this is the start of the wrapper div. 13 00:00:52,460 --> 00:00:57,515 Then I'll scroll all the way to the closing div tag and 14 00:00:57,515 --> 00:01:01,571 add a comment that says, end wrapper div. 15 00:01:04,744 --> 00:01:08,055 Now when you see the code change to a light grey color, 16 00:01:08,055 --> 00:01:10,790 that means that it's commented out. 17 00:01:10,790 --> 00:01:15,487 And as you can see, the browser does not display the start wrapper div and 18 00:01:15,487 --> 00:01:19,030 end wrapper div text written inside the comment tags. 19 00:01:21,473 --> 00:01:25,147 Now Workspaces and most text editors have a shortcut for 20 00:01:25,147 --> 00:01:28,270 quickly creating or removing comments. 21 00:01:28,270 --> 00:01:33,141 You place your cursor wherever you want to include a comment then 22 00:01:33,141 --> 00:01:37,410 press Command + / on a Mac or Ctrl + / on Windows. 23 00:01:37,410 --> 00:01:40,140 And that will create a comment tag for you. 24 00:01:40,140 --> 00:01:45,490 Now if you need to select and comment out large chunks of HTML, you can do that 25 00:01:45,490 --> 00:01:51,930 by selecting the code and pressing Command or Ctrl + /. 26 00:01:51,930 --> 00:01:55,180 And then to remove the comments you can, once again, select the code and 27 00:01:55,180 --> 00:01:57,042 press Command or Ctrl + /. 28 00:01:58,490 --> 00:02:00,990 You can use comments in all kinds of different ways. 29 00:02:00,990 --> 00:02:02,980 Just be sure to keep them short and meaningful.