Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
The Head2:57 with Joy Kesten
Where the head element should go and what should be included in the head element, such as the title and meta tag.
Below the doc type I've written a head element which contains meta 0:00 information about the document. 0:04 Just like humans have a head that are positioned above the body, 0:06 so do HTML pages. 0:10 And similar to humans, the head is smaller than the body. 0:12 Therefore, only a few things go inside the head. 0:16 And a lot of stuff goes inside the body in an HTML document. 0:19 Meta tags are one of the few elements that will go inside the head tags. 0:23 Meta information is like meta cognition or thinking about your thinking only here in 0:28 our HTML document, meta information is information about our information. 0:33 Here you can see a line that reads, meta charset UTF-8. 0:39 Charset means character set, and in this case, 0:45 we're going to use character set UTF-8. 0:48 This character set is what you'll want to use 99% of the time when 0:52 creating a website. 0:55 If you're using a different character set, 0:57 you probably have a very specific reason for doing so. 0:59 And you probably know why. 1:02 The next element you'll see between our head tags is the Title tag. 1:05 This allows you to write a title in the browser's toolbar. 1:10 And will come up when adding this page to your favorites. 1:14 It will also serve as the title displayed in search engine results. 1:18 Something to keep in mind when coding your program is that you 1:23 may not have more than one title element in an HTML document. 1:27 Next, you'll notice we have an opening style tag and 1:32 a corresponding closing style tag down here. 1:35 These two style tags indicate that what comes between these 1:39 tags are CSS code which will control how things look on the page. 1:42 Here you can see the first CSS statement says where we want our first headline text 1:49 to be and the second statement says what color we want our text to be. 1:54 In my story, I align the text in the center. 1:59 But you could've aligned it to the left or right. 2:02 Separated by a semicolon, is the color. 2:05 Here I chose a few colors. 2:07 There are many colors to choose from. 2:10 I use the words, green and 2:13 pink, to represent the colors for my title and author. 2:14 But don't be surprised if you see hexadecimal colors in the future. 2:18 These are number and letter combinations of red, green, and blue. 2:22 We'll talk more about hexidecimal colors in the future. 2:26 However, if you're interested in learning more about them now, 2:30 I've linked a page about hexidecimal colors in the teacher's notes. 2:33 Well, we talked about the head tags being positioned above the body. 2:38 More specifically, they begin right after HTML tag and before the opening body tag. 2:41 Speaking of, I'm excited to move on to what goes inside the body. 2:48 But first, let's take a quick quiz on character sets, title elements and 2:52 style tags. 2:56
You need to sign up for Treehouse in order to download course files.Sign up