1 00:00:00,240 --> 00:00:03,053 Everything that we've put in our webpages so far 2 00:00:03,053 --> 00:00:05,809 has been either content displayed by the browser, 3 00:00:05,809 --> 00:00:08,310 or tags to tell the browser how to display it. 4 00:00:08,501 --> 00:00:11,643 Sometimes though, we just want to put information in our webpages 5 00:00:11,643 --> 00:00:15,289 for other humans to read, and for the browser to ignore. 6 00:00:15,774 --> 00:00:18,917 To do that, we write an opening angle-bracket, 7 00:00:18,917 --> 00:00:22,346 an exclamation mark, two dashes, 8 00:00:22,346 --> 00:00:25,428 and some text inside here, 9 00:00:25,428 --> 00:00:28,966 and then two dashes and a closing angle-bracket. 10 00:00:29,099 --> 00:00:30,578 We call this a comment. 11 00:00:30,578 --> 00:00:33,891 And it's something that we do in all sorts of programming languages, 12 00:00:33,891 --> 00:00:37,027 because we often want to do things that are just for humans. 13 00:00:37,148 --> 00:00:38,958 That's the thing about programs: 14 00:00:38,958 --> 00:00:41,001 they're not just for computers to look at, 15 00:00:41,001 --> 00:00:43,011 they're also for other humans to look at. 16 00:00:43,162 --> 00:00:47,103 Because we often work together on things and learn from each other. 17 00:00:47,339 --> 00:00:49,211 Okay, what do we use comments for, 18 00:00:49,211 --> 00:00:52,122 besides just saying "hello" to our fellow humans? 19 00:00:52,260 --> 00:00:54,916 Well, we might use them for letting people know 20 00:00:54,916 --> 00:00:58,179 where content came from, in case they want to update it. 21 00:00:58,318 --> 00:01:05,034 I'll say, "This paragraph is based on the Wikipedia article," 22 00:01:05,284 --> 00:01:08,425 and I should probably give a link to that, too, but... 23 00:01:08,425 --> 00:01:16,383 And, "This paragraph is based on Pamela's personal opinion," 24 00:01:16,383 --> 00:01:18,715 a very well trusted source. 25 00:01:19,142 --> 00:01:23,937 Then maybe we'd even, say, give a link inside the comments, 26 00:01:23,937 --> 00:01:29,738 and say, "These lyrics were from here." 27 00:01:30,235 --> 00:01:34,084 And that helps people know how I got the content of this page. 28 00:01:34,194 --> 00:01:36,501 Do you notice something about these comments? 29 00:01:36,601 --> 00:01:38,430 They are all green. 30 00:01:38,539 --> 00:01:41,828 That's because we're using a code editor with syntax highlighting, 31 00:01:41,828 --> 00:01:44,348 and it uses colors to help us see what's what, 32 00:01:44,348 --> 00:01:48,046 and comments are pretty much always colored green, by convention. 33 00:01:48,227 --> 00:01:52,270 We could also use comments to "comment out" parts of our HTML. 34 00:01:52,497 --> 00:01:56,808 Like if we want to experiment with taking something away from our webpage. 35 00:01:56,938 --> 00:01:59,509 We just surround it with a comment. 36 00:02:00,219 --> 00:02:01,791 ♪ (humming) ♪ 37 00:02:02,416 --> 00:02:05,312 Now, the browser no longer sees that HTML, 38 00:02:05,312 --> 00:02:08,244 because browsers ignore everything in comments, 39 00:02:08,244 --> 00:02:10,528 and that part is gone from the page. 40 00:02:10,737 --> 00:02:14,666 If I decide that I actually liked it, I can comment it back in 41 00:02:14,666 --> 00:02:17,655 by removing those comments on both sides... 42 00:02:17,779 --> 00:02:19,085 and now it's back! 43 00:02:19,403 --> 00:02:22,053 Remember, comments are for humans. 44 00:02:22,243 --> 00:02:25,641 At least, the kind of humans that like to look at webpage code. 45 00:02:25,795 --> 00:02:28,773 Which is pretty much all of us now, right?