Start a free Courses trial
to watch this video
description
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upHey Katherine this is Nick Pettit here, and I don't normally do this, but 0:01 I know that you're, 0:05 that you're having a lot of trouble with this particular code challenge. 0:05 So I thought I would record a quick screen cast, just to sort of walk you through it, 0:09 and maybe explain what this code challenge is expecting and 0:13 kind of the difference between that and the code that you have. 0:18 So, let me start out by going to your forum posts, and 0:21 here's the most recent code that you typed in. 0:26 So let me copy that, and I'm going to come over to the code challenge here. 0:28 Delete everything that's there, and then paste in your code. 0:34 And when I do this and I step through each task, 0:38 everything is just fine right up until task number four. 0:44 So, here comes task number four here, it's thinking really hard about that one. 0:49 So here's task four, and when we hit check work, I get that error message. 0:54 Bummer, header cells must be inside of a table row, and have text in them. 1:00 Well, with the code that you have here, that's probably a little bit confusing, 1:05 because it certainly seems like there's a lot of table header cells here. 1:09 And it certainly looks like there's text inside of them, and 1:13 they're inside of a table row so, what's the problem? 1:16 Well, I think a better way to explain this might be to, for 1:21 me to start out with this code challenge fresh, and show you what it's expecting. 1:24 And then, we can kind of look at the difference between that, 1:30 and your code here. 1:34 So, we'll come back to the code that you have, and I'll show how to fix it. 1:35 But first, let me refresh the page here, and 1:38 just start out with this challenge fresh. 1:43 And the first instruction says create a table on the page. 1:47 And all it's asking for is a table element so, 1:53 we don't need to create a complete table and 1:58 fill it out with a ton of data and rows and all that, 2:03 we just need to create a table, just like that and that's it. 2:08 So we'll check work, it says great, can move on to the next task. 2:16 Now it says, add a table heading tag, to the table you just created. 2:20 Okay? 2:25 Well, we need to open up that table, add the T head. 2:26 We'll hit check work, and so far so good. 2:34 Now it says, now add a row inside of the table header. 2:40 Okay? Well, 2:44 that's pretty easy, we'll just open up this T head. 2:45 Add a row inside of it, 2:47 Hit Check Work and that looks good, so let's move on. 2:55 Now it says, put two header cells with any text inside, 3:00 of the row that you just created. 3:04 So another way of breaking this down might be, 3:07 inside of the row you just created, add two header cells. 3:10 Okay? So 3:16 here's the row we just created, and we need to add two header cells. 3:17 So there's one and there's our second one. 3:22 And then it says with any text inside. 3:28 So, we need to put some sort of text, inside of these table headers. 3:34 So, you can literally put anything you want, 3:40 as long as there's text in both of them. 3:43 So, you could say any text, or I could type in my name, it doesn't matter. 3:45 So, when I hit check work, it should work just fine, and it does and 3:53 I can move onto the next tasks in this code challenge. 3:58 So let's go back to the code that you had, and I'll go ahead and copy it. 4:03 And let me refresh the page and start this challenge over, and then once again, 4:12 I'll just sort of click through these steps, and we'll get to task four. 4:19 And let's just make sure it still doesn't work. 4:30 Okay? 4:32 Great, that's actually what we want in, in this particular case. 4:33 So, what's the problem here? 4:37 Why isn't this working? 4:40 Well if you noticed before, we only created a table, 4:42 and then a tcode and then two rows. 4:49 And then, or, excuse me, one row and then two header cells inside of it. 4:52 So when this code challenge is parsing your code, 4:58 it's really just looking at the first table row. 5:02 Now there's a second table row here, but it only asked for one, 5:05 so it's just looking at the first table row. 5:11 And inside of that first table row, there's only one table header cell. 5:16 So I could pass this challenge just by adding another, 5:22 table header cell inside of this first row. 5:26 And then I need to put some text inside of it. 5:30 And I can put anything I want, so I'll just put my name there. 5:33 And if we recheck work, that should do it. 5:38 So I think, the problem here is probably some instructions, 5:46 that might have been a little bit unclear. 5:50 When it said add a table, instead of maybe add a table element. 5:52 I can see how maybe you thought that you needed to create, 5:58 this whole big table here, with a bunch of rows and data. 6:02 But that's really not what it's asking for at all. 6:06 You can actually get rid of all this stuff, and just have this one row here. 6:09 And then have the two table header cells inside of it, 6:16 and then fill in your data there. 6:20 So, hopefully, that makes things a little bit more clear. 6:22 And, if you have any more questions, just let us know. 6:25
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up