Hello in this HTML Crash Course video, we are going to cover headings, there are six different heading classes. The first one is h one, all the way up to h six. h1 is bigger than hate six. So the bigger the number is the essentially the smaller the heading is. It's sort of counterintuitive when you think about it, because imagine if they wanted to do a bigger heading in the future in a future HTML specification thought it'd be hard to do but you can combine it with styling, obviously. So to do a heading tag, you just do less than the name of the tag.
So h1 to start off with greater than, to close it you put less than four slash, name of the tag and greater than, so in here, you put your head in on one. Save that refresh my browser and Then you can see this is on a separate line, it is a block level element as well. And if we inspect it as you can see it's got display a block so you'll be on a separate line. He has a bigger font size, it has some margin and the weight is bold so the text is bold, so it has its own styling tool, which is fantastic. So if we go to our text editor, I'm literally going to copy and paste this a few times and demonstrate the different tags h2, h3 h4 h5 h6 make sure you close the tag with the corresponding name or the wall you will get errors 23456 save that refresh and as you can see the difference between all the header tags pretty much it for this video.
But one thing I'm going to show you, if I were to go to this h5 tag and just put one page for this is invalid, because there's no hateful tag that is closing and the h4 tag isn't closed. Let's go back to our browser refresh. It's okay. Because with web development, the browser does a lot of work for you. It does make sure that it can display the website as good as possible. If we go to inspect, and we go to console as weird, he usually would put an error there.
So let me try deleting that save in it, refresh. It's very weird that there's no errors must be some sort of error. Checking has been disabled. But what you want to make sure you do is that you have it on Confirm date all conforms the standards. You might think, you know, it's working. Why do I care about closing tags, when you have a lot more code, trust me, it's not going to work and things will won't always look the best.
But what I'll show you if you type in w three c validator, so this is the W three c official markup Validation Service. So this allows you to upload a file to give some code and it checks if it's valid. HTML is a fantastic way of learning and making sure that your code is valid. So if you wrote some code, you can just select the file, upload it, click check. And as you can see, it's checked anything error correcting code and was not declared we can ignore that because heading cannot be a child of a number heading. So what it's saying is, there's a problem with line 32 Which is this line here.
So we know that they The problem with this Oh 44 slash, save that, go back here. And if I were to just check this foil one more time. Again, we don't care about this error at the moment. But as you can see, every other error has now disappeared because we fixed our code. So that's it for headings. Very simple stuff.
If you have any questions, feel free to post them on my education platform. So now learning Dakota, UK. I hope you enjoyed this video. There's a link in the description to the GitHub source, close the chapter out, and I hope to see you again in the next one.