Hi everybody. Let's talk about validation. I know that it's really easy to get caught up in your coding and just adding new content, adding new cool features, or adding little bit new CSS. But it's going to make your life much easier if you can consistently validate your code as you're writing it. Now, of course, there's a really good chance you're not going to follow this advice, because a lot of us ignore it. So, in this lecture, I want to talk to you today about how you should validate your code if you've added a big chunk and you're unsure where to get started. So, the validator that I'm talking about is the validator at validator.w3.org. This is the validator we've been using pretty much since we started our HTML course. But, before we get too far along I did want to mention that this is just one of many of the tools that w3 provides to help you check your code. Let's take a look at a few of them. We have the traditional validator at w3.org, but we also have an entire suite of validator tools. So we have the HTML checker. You could have a mobile checker, that kind of checks to see if your code is mobile friendly. There's a CSS validator, a link checker, even a internationalization checker. So, there are a lot of different tools out there, that you can use. And the reason that I bring this up, is that one of the key elements of your portfolio is finding one to four cool things that you're interested in. So this might be something people are really into validation, semantics, making sure things really check off on a check list. You might be interested in exploring some of these other tools and using them on your page. But first, let's get back to the traditional W3 validator. So you're going to have three different options. One is that you can upload a URL to validate a site. This option is only going to be available for those of you who actually host your site and have your own domain and URL. The next option, which most people tend to do, is by file upload. As you write your HTML file, and you have a complete HTML file. That doesn't mean a finished page. It just means you started and ended all the tags that you have so far. You can just upload the file and have it run through it. The third option is by direct input. This is when instead of validating an entire file, you want to validate the actual source code, the HTML code itself. This sometimes is helpful when you want to edit as you check. Because you can validate by direct input and then go in and change just a few words and validate again, rather than validating, opening your file, changing it, saving it, etc. Let's go ahead and take a look at an example validation. So, what I have over here with my code is just a page with a bunch of stuff in it. I've just dumped a bunch of things that I can think of. I have JavaScript and images and calendars, I just wanted to test a bunch of stuff at the same time. And then here's the page. You can see that it does load, even though, so even though there may be errors, someone looking at the page might not know it. So let's go ahead and validate. I have my option of validating by URL. Well, since I haven't hosted this page, that's not actually an option for me. So instead I can validate by file upload, or validate by direct input. This first time, I'll just go ahead and do validate by file upload. Find my code, and put it in. All right. Right away, you're going to see that I've definitely generated some errors. I have a few things here. I'm going to bring it right to the center. Make this a lot bigger, so we can all follow along together. First off, you can see that for both of my images, I forgot to include an Alt attribute. W3 is taking this much more seriously than it used to in the past, where this was just a warning. But now, it's really saying, your code is not going to validate if you don't include alternative text. now i have a few additional things where my code is complaining because of some other code that I've put in from Google Calendar. Whenever you see something is obsolete and they say use CSS instead, this means, hey, you are using some code it works, but this isn't a good way to do it. You should not be inputting your HTML and your style together. That style should really go into your style sheet. So these first four are pretty easy to fix. The next one though is when you realize, ugh, I haven't been paying attention. Whenever you see something that said you saw an end tag after body had been closed, or stray end tag div, this just means you didn't line things up correctly. So I'm going to go back over here for a second, and just fix my Alt tags here. Alt = pic 1 and Alt = pic 2. So last time I had six errors. Let's try this again. Check it. And now, I'm down to four. So that's what validating's about, it's about fixing one error at a time, revalidating, rechecking again. Now, before we're done, I do want to mention this. If you look at my code you can see that I have used a style attribute inside my image tag. This isn't good. I shouldn't be doing this and the validator did not pick it up. This is why you need to go above and beyond what the validator says W3 isn't enough. You're also going to want to do things with Wave, with Webbing. And it's in general. Check your code by eye as well. But, hopefully now you'll get into the habit of coding, validating, coding, validating and just getting into the rhythm. Good luck.