WEBVTT 00:00:00.240 --> 00:00:03.053 Everything that we've put in our webpages so far 00:00:03.053 --> 00:00:05.809 has been either content displayed by the browser, 00:00:05.809 --> 00:00:08.310 or tags to tell the browser how to display it. 00:00:08.501 --> 00:00:11.643 Sometimes though, we just want to put information in our webpages 00:00:11.643 --> 00:00:15.289 for other humans to read, and for the browser to ignore. 00:00:15.774 --> 00:00:18.917 To do that, we write an opening angle-bracket, 00:00:18.917 --> 00:00:22.346 an exclamation mark, two dashes, 00:00:22.346 --> 00:00:25.428 and some text inside here, 00:00:25.428 --> 00:00:28.966 and then two dashes and a closing angle-bracket. 00:00:29.099 --> 00:00:30.578 We call this a comment. 00:00:30.578 --> 00:00:33.891 And it's something that we do in all sorts of programming languages, 00:00:33.891 --> 00:00:37.027 because we often want to do things that are just for humans. 00:00:37.148 --> 00:00:38.958 That's the thing about programs: 00:00:38.958 --> 00:00:41.001 they're not just for computers to look at, 00:00:41.001 --> 00:00:43.011 they're also for other humans to look at. 00:00:43.162 --> 00:00:47.103 Because we often work together on things and learn from each other. 00:00:47.339 --> 00:00:49.211 Okay, what do we use comments for, 00:00:49.211 --> 00:00:52.122 besides just saying "hello" to our fellow humans? 00:00:52.260 --> 00:00:54.916 Well, we might use them for letting people know 00:00:54.916 --> 00:00:58.179 where content came from, in case they want to update it. 00:00:58.318 --> 00:01:05.034 I'll say, "This paragraph is based on the Wikipedia article," 00:01:05.284 --> 00:01:08.425 and I should probably give a link to that, too, but... 00:01:08.425 --> 00:01:16.383 And, "This paragraph is based on Pamela's personal opinion," 00:01:16.383 --> 00:01:18.715 a very well trusted source. 00:01:19.142 --> 00:01:23.937 Then maybe we'd even, say, give a link inside the comments, 00:01:23.937 --> 00:01:29.738 and say, "These lyrics were from here." 00:01:30.235 --> 00:01:34.084 And that helps people know how I got the content of this page. 00:01:34.194 --> 00:01:36.501 Do you notice something about these comments? 00:01:36.601 --> 00:01:38.430 They are all green. 00:01:38.539 --> 00:01:41.828 That's because we're using a code editor with syntax highlighting, 00:01:41.828 --> 00:01:44.348 and it uses colors to help us see what's what, 00:01:44.348 --> 00:01:48.046 and comments are pretty much always colored green, by convention. 00:01:48.227 --> 00:01:52.270 We could also use comments to "comment out" parts of our HTML. 00:01:52.497 --> 00:01:56.808 Like if we want to experiment with taking something away from our webpage. 00:01:56.938 --> 00:01:59.509 We just surround it with a comment. 00:02:00.219 --> 00:02:01.791 ♪ (humming) ♪ 00:02:02.416 --> 00:02:05.312 Now, the browser no longer sees that HTML, 00:02:05.312 --> 00:02:08.244 because browsers ignore everything in comments, 00:02:08.244 --> 00:02:10.528 and that part is gone from the page. 00:02:10.737 --> 00:02:14.666 If I decide that I actually liked it, I can comment it back in 00:02:14.666 --> 00:02:17.655 by removing those comments on both sides... 00:02:17.779 --> 00:02:19.085 and now it's back! 00:02:19.403 --> 00:02:22.053 Remember, comments are for humans. 00:02:22.243 --> 00:02:25.641 At least, the kind of humans that like to look at webpage code. 00:02:25.795 --> 00:02:28.773 Which is pretty much all of us now, right?