1 00:00:00,850 --> 00:00:02,600 I learned markdown from a cheat sheet. 2 00:00:02,600 --> 00:00:06,390 And I still reference cheat sheets when I can't remember how to format something. 3 00:00:06,390 --> 00:00:10,190 But cheat sheet is just a document with notes that you can reference when needed. 4 00:00:10,190 --> 00:00:14,240 It's impossible to remember everything about any coding language. 5 00:00:14,240 --> 00:00:18,220 So this type of reference document, or cheat sheet, is helpful. 6 00:00:18,220 --> 00:00:20,880 I thought it might be nice to create a cheat sheet together. 7 00:00:20,880 --> 00:00:24,100 If you follow along with these videos, you will by the end of the course, 8 00:00:24,100 --> 00:00:26,950 have a mark down cheat sheet for your own reference. 9 00:00:26,950 --> 00:00:31,110 That's right, we're going to use markdown to make a markdown reference. 10 00:00:31,110 --> 00:00:34,810 Enough of my mug, let's see my screen and go from there. 11 00:00:34,810 --> 00:00:38,630 In this video, I'll cover creating headlines, paragraphs, 12 00:00:38,630 --> 00:00:43,250 quotes, bolding and italicizing text, and creating horizontal rules. 13 00:00:44,350 --> 00:00:46,910 In the previous video, I created the headline. 14 00:00:46,910 --> 00:00:52,092 To format a headline, or heading, in markdown, you use a pound symbol or 15 00:00:52,092 --> 00:00:56,810 #, and then the text that you wanna use for your heading. 16 00:00:56,810 --> 00:01:00,890 That's why markdown basics is large and bold over here in our preview. 17 00:01:00,890 --> 00:01:03,720 It's formatted as a first level heading. 18 00:01:03,720 --> 00:01:07,340 The most common way to render markdown is with HTML. 19 00:01:07,340 --> 00:01:12,570 Basically our final document will be translated into HTML for use on the web. 20 00:01:12,570 --> 00:01:15,190 HTML provides six levels of headings. 21 00:01:15,190 --> 00:01:19,140 For this reason, we have six levels of headings in markdown too. 22 00:01:19,140 --> 00:01:21,690 Again, you don't need to know any HTML. 23 00:01:21,690 --> 00:01:24,830 I bring it up here only to provide some background. 24 00:01:24,830 --> 00:01:29,090 You type that single hash to create the largest, or first level, heading. 25 00:01:29,090 --> 00:01:32,590 A second level heading uses two hashes next to each other followed by 26 00:01:32,590 --> 00:01:34,060 a space in your text. 27 00:01:34,060 --> 00:01:37,370 The rest of the headlines just use another hash. 28 00:01:37,370 --> 00:01:40,360 The first section of our cheat sheet will be about headlines, 29 00:01:40,360 --> 00:01:45,210 paragraphs and basic formatting, so let's add that as a second level heading. 30 00:01:45,210 --> 00:01:50,331 So type one, two hashes, space and 31 00:01:50,331 --> 00:01:55,283 then our text which is Headlines, 32 00:01:55,283 --> 00:02:00,762 Paragraphs, and Basic Formatting. 33 00:02:00,762 --> 00:02:05,154 Now beneath this larger topic, we've been talking about headlines and 34 00:02:05,154 --> 00:02:09,762 since we're creating a cheat sheet together, let's create that as a third 35 00:02:09,762 --> 00:02:14,160 level heading, so one, two, three, and we'll call this headlines. 36 00:02:15,880 --> 00:02:18,206 Now, to save us a little bit of time, 37 00:02:18,206 --> 00:02:23,327 I'm going to just copy some headlines that I already have and paste them in here. 38 00:02:26,875 --> 00:02:32,650 And you can see our fourth, fifth and sixth level headings, here in our preview. 39 00:02:34,390 --> 00:02:35,668 We'll create some more heading as we go. 40 00:02:35,668 --> 00:02:38,280 But I think this is enough demonstration for now. 41 00:02:38,280 --> 00:02:43,290 Let's delete this starter text and write our paragraphs and line break section. 42 00:02:44,690 --> 00:02:47,080 So I'll add that as another third level heading. 43 00:02:49,320 --> 00:02:57,040 We'll call this Paragraphs and Line Breaks. 44 00:02:57,040 --> 00:03:01,270 We create paragraphs by typing the way we would in any other program. 45 00:03:01,270 --> 00:03:03,900 Just hit Return twice to start another paragraph. 46 00:03:03,900 --> 00:03:07,360 There is really nothing special about the paragraph. 47 00:03:07,360 --> 00:03:10,170 Where you see empty space between blocks of text and 48 00:03:10,170 --> 00:03:13,170 your mark down document you will see empty space separating those 49 00:03:13,170 --> 00:03:16,750 blocks of text in your formatted HTML document. 50 00:03:16,750 --> 00:03:20,465 I'm going to save us a little time again and just paste in two paragraphs here. 51 00:03:23,907 --> 00:03:27,620 As you can see we have space here which corresponds to our space over here. 52 00:03:28,940 --> 00:03:32,920 Now to make this a little easier to see I'm just gonna add a bunch of returns 53 00:03:32,920 --> 00:03:35,610 in here that's not important for 54 00:03:35,610 --> 00:03:38,680 the document but it just makes it a little easier to see in the video. 55 00:03:39,780 --> 00:03:44,640 Now you don't always want that space that appears between one line of text and 56 00:03:44,640 --> 00:03:46,920 another when you're creating line breaks. 57 00:03:46,920 --> 00:03:48,600 For example, lines of poetry or 58 00:03:48,600 --> 00:03:53,190 song lyrics don't typically have spaces between them the way paragraphs do. 59 00:03:53,190 --> 00:03:58,150 To add just a Line Break without a space type two spaces at the end of the line and 60 00:03:58,150 --> 00:04:00,170 then press Return once. 61 00:04:00,170 --> 00:04:05,408 Let's practice this by adding a stanza from Pablo Neruda's Sonnet number 17. 62 00:04:05,408 --> 00:04:07,517 So I'll just type the first line here. 63 00:04:14,760 --> 00:04:20,490 And then this is the end of our first line so I'll type one, two spaces. 64 00:04:20,490 --> 00:04:22,750 Return and my second line. 65 00:04:24,710 --> 00:04:29,710 And this is the end of my second line, so one, two, return. 66 00:04:29,710 --> 00:04:30,471 And our third line, 67 00:04:41,078 --> 00:04:42,320 And again, one, two. 68 00:04:43,410 --> 00:04:46,500 And now to save us a little bit of time I'm just going to copy the last 69 00:04:46,500 --> 00:04:51,110 two lines of the stanza as well as our attribution and paste them into our doc. 70 00:04:53,880 --> 00:04:55,770 Okay, and if we scroll down in our preview, 71 00:04:55,770 --> 00:04:59,810 we can see that this is working mostly the way we expect. 72 00:04:59,810 --> 00:05:06,600 However, here between, any and other, we should have a line break. 73 00:05:06,600 --> 00:05:08,995 So, we can just come up and fix that one two. 74 00:05:10,080 --> 00:05:13,272 And you can see it fixed here in the preview. 75 00:05:13,272 --> 00:05:17,593 And then don't worry about this too much, this is just the attribution for 76 00:05:17,593 --> 00:05:20,007 the book that I pulled this stanza out of. 77 00:05:20,007 --> 00:05:24,040 You can definitely check it out if you want, Pablo Neruda stuff is great. 78 00:05:24,040 --> 00:05:28,587 So let me come over here and we will add another heading for our next section, 79 00:05:28,587 --> 00:05:30,518 which is Emphasis and Bolding. 80 00:05:36,103 --> 00:05:40,400 The ability to italicize and bold text is a must for any formatting tool. 81 00:05:40,400 --> 00:05:41,970 Markdown makes it easy. 82 00:05:41,970 --> 00:05:46,080 Let's start with emphasis which will show up as italicized text. 83 00:05:46,080 --> 00:05:50,070 Now, I'm gonna throw in a fourth level heading here for italics, 84 00:05:50,070 --> 00:05:53,460 it might seem like overkill but I like to keep things as organized as possible. 85 00:05:53,460 --> 00:05:58,380 So one two three four italics, and 86 00:05:58,380 --> 00:06:03,350 then I'll throw in again just a bunch more returns, and that's just to make it. 87 00:06:03,350 --> 00:06:04,340 Easy for us to see. 88 00:06:05,990 --> 00:06:09,520 Now, emphasis can be added by placing either the asterisk or 89 00:06:09,520 --> 00:06:13,680 the underscore characters on both sides of the text that you wanna format. 90 00:06:13,680 --> 00:06:18,962 So, this works and 91 00:06:18,962 --> 00:06:23,990 this Works too. 92 00:06:25,380 --> 00:06:31,120 If we scroll down in our preview you can see works as italicized in both places. 93 00:06:31,120 --> 00:06:36,000 I recommend using the * like this because it's preferred by the type of mark down 94 00:06:36,000 --> 00:06:39,220 used on GitHub which is a popular service used by programmers, 95 00:06:39,220 --> 00:06:41,030 we mentioned it earlier. 96 00:06:41,030 --> 00:06:45,566 Also, in coding languages such as Python, the underscore character is used often, 97 00:06:45,566 --> 00:06:48,968 so it's nice to have the underscore stand out as part of your text 98 00:06:48,968 --> 00:06:52,191 rather than allowing it to be mistaken for Markdown syntax. 99 00:06:54,480 --> 00:06:58,864 Bolding is just like italicizing text but you add another asterisk or 100 00:06:58,864 --> 00:07:01,290 underscore on both sides of the text. 101 00:07:01,290 --> 00:07:06,316 So, this works and 102 00:07:06,316 --> 00:07:12,716 this Works too. 103 00:07:12,716 --> 00:07:19,650 And again you can see down in the preview our text is bold in both places. 104 00:07:19,650 --> 00:07:22,520 Again, I prefer the asterisk to the underscore. 105 00:07:22,520 --> 00:07:26,270 The important thing is to be consistent pick one of the options and 106 00:07:26,270 --> 00:07:28,690 stick to it throughout the markdown file. 107 00:07:28,690 --> 00:07:32,801 You can even bold and italicize text at the same time, like this. 108 00:07:36,507 --> 00:07:41,191 So we have two for the bolding, one for the italics, and 109 00:07:41,191 --> 00:07:43,690 again both sides of the text. 110 00:07:44,940 --> 00:07:50,470 And this would work too, again one for 111 00:07:50,470 --> 00:07:55,170 italics, two for bolding, and 112 00:07:55,170 --> 00:08:01,020 you can see here on our preview works is italicized abled in both places. 113 00:08:01,020 --> 00:08:03,160 All right, we've covered some core topics but 114 00:08:03,160 --> 00:08:05,750 there are two more things to see in this video. 115 00:08:05,750 --> 00:08:08,220 The Blockquote and the Horizontal Rule. 116 00:08:08,220 --> 00:08:11,790 A blockquote sets text apart from the rest of the document. 117 00:08:11,790 --> 00:08:14,290 As the name implies, it's often use for quotes, 118 00:08:14,290 --> 00:08:18,970 more specifically it indicates that the text is quoted from another source. 119 00:08:18,970 --> 00:08:24,220 So let's thrown in a third level heading for Blockquotes. 120 00:08:25,680 --> 00:08:31,140 And then to save us a little time, I have a quote all ready to paste in here, 121 00:08:31,140 --> 00:08:36,960 from the creator of Markdown, John Gruber, paste that there. 122 00:08:38,720 --> 00:08:40,640 Now you might've noticed something. 123 00:08:40,640 --> 00:08:44,540 The Blockquote is formatted using the greater than symbol. 124 00:08:44,540 --> 00:08:48,540 If you want the blockquote to span multiple paragraphs 125 00:08:48,540 --> 00:08:53,920 the greater than symbol needs to appear on the empty space between paragraph as well. 126 00:08:53,920 --> 00:08:55,870 Now let's scroll down in our preview. 127 00:08:55,870 --> 00:08:59,470 And you can see the way Adam is displaying this we have this bar, 128 00:08:59,470 --> 00:09:03,620 beside the Blockquote, the background is a slightly different color. 129 00:09:03,620 --> 00:09:09,810 And we have our text all indented and separated out from the rest of the text. 130 00:09:09,810 --> 00:09:12,294 So you can see there's just a little bit formatting for 131 00:09:12,294 --> 00:09:13,813 a Blockquote to separate it out. 132 00:09:15,403 --> 00:09:17,395 Okay, that's a good start. 133 00:09:17,395 --> 00:09:21,185 Let's separate this from our next section with our horizontal rule. 134 00:09:21,185 --> 00:09:25,135 Which is just a line used to separate sections of a document. 135 00:09:25,135 --> 00:09:29,785 First I will create a few returns in here so we can see what we're doing, 136 00:09:31,415 --> 00:09:37,325 and one, two, three, Horizontal Rule. 137 00:09:39,490 --> 00:09:43,900 Now you create the Horizontal Rule with either underscores, hyphens, 138 00:09:43,900 --> 00:09:45,670 or the asterisk. 139 00:09:45,670 --> 00:09:48,740 I prefer hyphens because that leaves the asterisk for 140 00:09:48,740 --> 00:09:53,360 bolding, italicizing, and making lists, which we'll see in the next video. 141 00:09:53,360 --> 00:09:55,110 Also hyphens look like lines, 142 00:09:55,110 --> 00:09:58,470 so they're easy to remember when making a Horizontal Rule. 143 00:09:58,470 --> 00:10:03,030 I'll type all three examples here just so that you can see them in action. 144 00:10:03,030 --> 00:10:07,272 So we've got the ___, the ---, 145 00:10:07,272 --> 00:10:10,980 and the ***, 146 00:10:10,980 --> 00:10:16,000 and you can see it's just three of those in all three cases. 147 00:10:16,000 --> 00:10:19,360 If we scroll down you can see three Horizontal Rules. 148 00:10:21,230 --> 00:10:24,000 All right, that's a wrap on this section. 149 00:10:24,000 --> 00:10:26,580 Save this, and I will see you in the next video.