What is HTML5 & CSS3
Hi there. This video is all about learning the absolute fundamentals of what html is versus what C. S S is. You can skip this if you've got a basic understanding, we're going to do some real simple stuff here, we're gonna add some html tags. It will look like that and then we'll style them using CSS. Okay. And it will look like, oh, here we go. Oh that better look worse. But you get the idea. Okay, we're going to do html and then make it look pretty using CSS. Let's jump into the video and learn out how Okay to get started. We're gonna type our html first. So this word Hello world. Okay. It's not html. It's just some plain old text we typed in. Delete that. So when we write html, we need to follow some syntax. Okay, So we're going to put in something called a heading and in this case heading one the most important heading on a website and in html it uses the abbreviation of H one. Now we can't just type H one. We need to wrap it up in angle brackets. So open angle brackets, H one and t...
hen close angle brackets So you can see it there. It did a couple of things. We typed in our H1, we put the brackets either side and you'll notice that Venus code automatically put in this extra closing tag. So that's how HTML works. It's a wrapper tag. Okay. It's a tag that goes around the beginning and the end and everything in the middle. This is my heading, hitting one even. Okay. So as long as there's a church one on one side on the other side, the wrapped in angle brackets. The closing you'll notice has this forward slash and that tells the browser that this is my heading. Alright let's save it. Let's check it in google chrome and you can see there refresh. I've got my hitting one, it's big, it's bold, it is times new, roman, it's black. That is the default setting for a heading one. Let's add a couple of other html tags. So in here we're gonna return in. I'm going to type angle brackets. H to close them. You'll see it puts in the extra syntax if it doesn't. For whatever reason you can just type it in. So I'm gonna start typing. It really wants to help out. Thanks for his code and this is just right heading to. So those are a couple of real basic html tags. Another really common one is a P tag so angle brackets p close it off and this is like body text. Okay. And often you'll have a lot you'll have probably just one H. One on your page but you'll have lots of different paragraph text because it's the body text. Save it, check it in our browser and you can see these are the default stylings for those three tags to override the styling. That's where CSS comes in. So what we need to do is our html is kind of like things on the page and our CSS is the styling of those things in the page to make this work. Let's put a couple of returns at the top here and type a tag called style. Okay. Close it off and again. It puts in the closing tag and what I just did there is I put it in a few returns, returns don't mean anything in code. Okay, You can have a million of them. Um it won't display on the page. I just use a lot of returns when I'm styling things, just give some sort of visual, breaking up of different parts rather than trying to cram them all together. Because what you'll notice down here is if I delete this, I'm just bringing it up. They're all on the same line. If I save it, you'll notice back here in chrome. It's exactly the same. So it doesn't matter whether you put returns in here or not. Okay. Except that it looks hard to work on, so in this style tag. Okay, this is where our CSS is going to go and see S. S has a different type of syntax, whereas html had an opening closing angle brackets and a forward slash there. The CSS you do things like this, you say I want the H1, this is called the selector. I'm selecting the H one, then you put it in a space and then put in the curly brackets rather than the angle brackets. I'm going to put a return on my curly brackets just to separate it out. Not for any good reason other than it looks a little bit more easier to communicate to you. Okay. And in here I'm going to do um some H1 styling and we'll start with color. Okay. We've got to smell it. The american way. Okay, color. And after this. Okay, this is the property. So selector. I'm circling each one. I want to add the property color to it. It needs to end with a colon and then you pick a color. There's lots of default ones in there. I'm just going to put a space in a tight red and at the end of CSS you have to have a semicolon. Okay, so curly braces, colon, semicolon. That is the syntax pretty much for all of CSS. Pretty simple. Save it and let's see if it works simple to the browser and refresh and look at that. Each one is styled now. I know this is not a huge amount we're doing here, but I'm excited. I'm excited for you. I remember learning this stuff and it was a revelation. So let's do something else. I'm going to put a return in here. Okay. And so if you want, we're going to group CSS We want to do a few things to the H1 so as long as it's within these curly braces. Okay, we can type in something like font. I'm gonna put in font style. Okay, you can see the S code really wants to help you kind of suggest things. Okay. And you're like oh size style display. Okay, I'm gonna use style, I'm using my mouse now instead of typing it in. Okay, that's just one of the little helpful things you can do with the S code or you can use your arrow keys on your keyboard. Did you see that little blue line moving around? Okay I can go there and hit return on my keyboard. We've got almost all of it. Okay, so we've got our property, there's the colon, we've got our actual value. Okay, which is italics and what goes at the end? You got it semi colon. Let's hit save, let's see what it does. Let's refresh, it's italics and it's red and it's an H. One, brilliant. So I'm going to set a class exercise now, I want you to change his H. One to be a font size of 100 pixels or PX. Okay, I'd like you to pause it right now. Go hit the button and I want you to see if you can do that font size at 100 pixels. Give it a go, I'll give you a hand in a second, pause, go Alright, you may or may not have paused or you may have may not have made it work. Let's see if you followed me. So font size. Here we go. Got a colon then put in 100. And what people often forget is you need the P. X. Okay. And we use pixels when we're dealing with fonts at the moment and what goes at the end semi colon. Save it back into here. Refresh. Look at that giant H one. Alright, Let's start with the H two together And then I'll set another little exercise. So H one now we I put a couple of returns in here, curly braces. Okay. You can kind of you separate the map using these kind of selector then the curly brackets and everything goes in the middle that you want to do to that particular selector. So in this case we're going to do a color of wood color blue, semi colon and we'll do a font size font size of 50 pixels. So give that a go now and I'm going to set a verbal exercise. Okay I want you to try and do the P tag all by yourself. I want you to make it green and I'd like to have a font size of 20 pixels. Give it a pause now, see how you go and pause. Alright, how did that go? I hope you did. Well let's follow it together. Tag curly braces. Color of green, there's a few different greens, Yellow, green, green, yellow, that's my one semi colon. And we're going to put in a font size of 20 pixels. Semi colon save back into here. Refresh. Look at all that good stuff. So that's just an introduction to what html is and what the syntax looks like. These are these guys down here and the styling of them. Okay. We talk about selectors. I use the kind of nerdy words here so that it becomes a bit more natural for you. Okay? So the selector? This is the attribute. No, that's the property. That's the value of that property. And that's the basics of websites. Okay. We're just going to expand on that. We'll build some boxes to put this stuff in. We'll start doing some interactive bits and pieces. But yeah, that's the fundamentals of html and CSS. Let's jump into the next video.