Hi there in this video we're going to discuss things like normalize reboot. Html Five dr eric Meyer's reset basically. They're all the same thing they were called CSS reset. What do they do? The real quick version is that by default? Lots of our tags like H one's H two S. Some of our lists and p tags that will have styling apply to them. A CSS reset. You add to your CSS to get them all looking the same. These are still H one's still H two S and still in ordered lists but they all look the same and we, as designers get to go through and decide what the size is, what the font is, what the weight is without letting the defaults or fighting against them. That's a CSS reset. Also note in this video coming up I say erIC resalat instead of ERic Myers because I'm reading the eric Reese book on lean startup for like the third time and he's in my brain so I will toggle between those two names throughout this video. Sorry erIC Meyer? Let's jump in. Alright. I know we just created these files but ...
let's close them down. We're going to create like a throwaway file first just to kind of prove the points and then we'll get back into applying it to our actual project. So we're going to create two files. Okay, two new files, let's say that this one is going to be called? Delete Me one. We'll just call it. Delete me dot html. I use the word delete me. So I give permission to my future self to business without even checking it. You know, you make those files and you've got them on your machine, you're like, is that important? If I call it delete me, I give myself permission to delete it without even checking it. Okay. So I'm gonna save this. Gonna have delete me dot CSS. Okay. So we've got to delete me to html. Delete me dot CSS. Let's connect them up, separate them out like the last one. Okay. And put in your or your metadata and connect them up. It's good practice. Okay link, blink CSS. It's not called style in this case it's called delete dot CSS. Alright. So what is this CSS reset stuff you talk about? So basically whenever we make a document in html there was predefined stuff. So if I make in each one right and I call this one my heading and I had saved and then I preview it and a little note that wasn't working for me a second ago. Okay. I couldn't find that little button. If you can't find that little button just right, click your page here and say open with a live server. The joys of plug ins a little quick for it. So I've got it open here so we know if we put it in our heading. It makes a big bold black times new roman. There's padding above it. There's some spacing on the left. There's definitely some spacing underneath. Okay. Just those are the defaults. Somewhere in like the days of yore of internet, somebody decided that's what an H. One should look like all the time. The first thing I do is the designer is I want to change it and that's where the CSS reset comes in. Okay. I want to actually, I wanna heading to look exactly the same as the heading to exactly the same as a paragraph and I will decide what size they are not kind of fighting against the defaults. So let's look at doing it to see what it does first. So over here we've got our heading one. Let's put in a heading two and heading to is going to be now putting in place holder text is a chore. Okay, because you have to think of something to put in like I do this all the time. So we put in some fake texts called Lauren ipsum. You probably you might have come across it again in different places, but basically if I type in Laur Lauren with Annie okay. And hit return, it puts in a bunch of mixed up latin words. Okay, they are all words but they're all kind of jumbled up but as a kind of a cool like to save it, you can see it's just a nice little placeholder. Okay, that one's a bit long so I'm gonna do a couple of things. One is I'm gonna turn my rapping back on. So view toggle word wrap and what I'll do is I don't want that many words so it gets even better. Lauren, this is using Emmett. Remember we talked about it before? It's a little abbreviation and let's say I just want five. So Emmett no spaces five hit return five words. Go on. Let's put in some other kind of default tags. I put a P tag and I want this one to be Laura um of say 20 return. I'll put in a couple of other tags that you don't know about yet. Let's go are you Well. And so that you will put an L. I. It's an unaltered list with a list item inside of it. If you're like what is that? We'll deal with that later on. So you L. And an O. L. With allies on the inside. If you can't make those happen, don't worry, it's not really important. They look like, oh you have to write something in the middle here. So I'm going to um something something in the middle. You're watching me. Sometimes I get a bit non flowy. Anyway, so an ordered list is a bullet point ordered list and Ol has a number but they will have their own kind of like things. There's spaces between these, this is indented. This one here has a big gap. The one is even bigger gap. This is bold. This one's not so let's clear all the defaults by doing a CS. S reset. Now, is there a specific one you can use? No, there's a zillion of them. You can make your own one and the one that I use the most and it's quite popular around the internet. If you look in your exercise files, there's one called project to let's open up this one here. CSS reset ERIC Meyer. He was kind of like the most famous this guy here, web developer. He made a CSS reset. Everyone used it. It's been updated a couple of times. I still use it. I love it. But there are other ones. There's things like normalize, we'll discuss in this one. But there are other ones that we won't cover. They're just kind of alternatives for it. There's one called Norwood Normalize. We're doing that one reboot. Html five. Doctor. What else? Those are the ones that come to the top of my mind. But there are lots of ones and if you're like me, you end up starting with somebody like ERIC Myers one and then adjusting it as you want. So I'm gonna open it up. I'm going to copy all of this stuff out of it. So I'm just selecting it all copying it and I am going back to visual studio code now. Where do you put it. What we'll do is we'll put it in this delete dot CSS we'll paste it in that, is it? That's all we have to do. I'm going to save all both sides now. Let's look at the document so it just clears everything. It just says we're all the same. We're all equals here and you can now go through as a design and say all right now down the bottom here, after all of this, I can say I want my H one to be a real no one to put it in font family of aerial semi colon. So now I get to decide and I kind of build it up from there. Can you see the kind of the logic in it? At least you might not like it. You might like to start with all the defaults and that's totally fine. What else am I doing? Trying to talk and code? There we go. I made it bigger. So I do this whenever I'm starting a new site, I will go through grab eric Myers one and just paste it in the beginning and work from the bottom down. Let's look at this one versus say normalize. So I'm going to let all of this delete it like the normalized one. It does like a different flavor of it. So what normalized does, instead of kind of resetting, it defaults, what it does is I'm going to copy all of this, paste it in, save it and have a look and you're like, hey that looks really similar to what it was and it kind of is what I'll try and do is I'll open that one. I'll be back in a second to compare them. Alright. Sitting sub side by side and you're like they look the same. Ah But look the padding is different on the side there. Okay. I guess the big difference between it is normalize adds consistency across browsers so we know that we're using Chrome in this case it's our browser but you might be using Microsoft edge or Microsoft Internet Explorer or Mozilla, Firefox. Safari. There's lots of different browsers and the problem with all these different browsers, they've all decided to interpret it. Our H one's our H two S. P. Tags, all of these things slightly differently. It's a little hard to show like the extreme. So I'm showing you in Safari. Okay it just looks different. Firefox, okay looks different. The spacing is a little different. Okay now what normalized does is that it will make it consistent across all of them. All of them have the same padding on the site, all of them they have the exact same spaces between them. That is the job of normalize there is them instead of trying to like do things and testing on one browse and it's like why is it different on this normalize? There's away it's really quite beefy bit of CSS okay that just tries to I guess make everything look consistent. You can see in here there's lots of commenting. You can see this little option here. This weird little hack will make the font sizes of H ones when they're in a section. An article be consistent across all of these different browsers, that's its job consistency. It's still a CSS reset but it's doing something slightly different. It's just making everything look the same. Whereas the one for eric Reese makes everything nothing so go away. Everything this one just says lets everybody be the same. Does that make sense? Maybe the first one, but not the secondment, bad teaching then. So what I'm going to do now is go and apply it, we'll do it in a second actually will apply it to our project to site. But a couple of things to think about when you are doing it is never put this in halfway through a job because it's like a house of cards, right? When you start building stuff, everything relies on everything else. Okay, you style the body tag to be a font but then you you change the H one to pick a different fonts and it's kind of built on top of that original body tag and it's a teetering tower so you can't just go and throw it at the top of your document and hope to fix some problems. Doesn't work. Just leave it out if you have got a site that doesn't have it, I show it to you because you'll have sites that already have it in there and you be like what is all this stuff? I don't even know what it does and you start deleting stuff and I'll be like yeah, it's not doing anything because somebody has used a CSS reset like this. The other thing to note is that it is very opinionated. Okay. People don't like eric reasons, one because of X, Y and Z. And another person thinks it's good but they should change this and he shouldn't have done that. And there's a lot of these different resets, I've only just given you a couple but there are loads of them out there and you will find the times where you're like actually that CSS reset is not working for me. So you create like a eric recess eric Reese um modified by dan. I keep saying eric Reese, he's a different person. Eric Myers, eric Greece's, is he the lean startup guy anyway, you get what I mean? Right, Alright, so let's go and implement this, I'm going to not save it because I don't, it was just like a little throwaway test page and what I'll do is I'll delete it over here to make it nice and clean for our notes. Sounds good to delete. Gone. Alright, so open up both of these double click them. It'll open up two tabs rather than just one and we're back. Alright, so to apply them, you can just dump them in the CSS most people meet people included like to keep it in its own separate sheet. So what we'll do is we'll create another file called, save it and I'm gonna call it CSS reset. Remember? No spaces. CSS let's rest. Okay, reset. Let's click save. So we've got to style sheets. Only one of them is connected and we need to add two of them and this is really important where it goes. The good thing about CSS is you can have as many as you like. Okay, we, you can have two of them just to separate everything else out for small websites. You don't really need to do this unless you've got something like this. Like a CSS reset. And what do we call it? We call it? CSS reset or rest. Okay. And the big thing is this order okay? Your reset needs to be in front of your style sheet. Otherwise it'll do really weird stuff because you're going to say like bh one in your own one, let's say it's back. The other way the page loads from the top to the bottom of the very first thing the browser sees is like, hey, I'm html and it goes thumbs up and then it says, hey, I'm written in the english language and it goes thumbs up. So it's reading it down from the top. Okay. And gets to here, gets to here, gets to here and then we'll get to your style and you say, I want my heading one to be white and then the reset says, hey everybody be black. Okay. And then it carries on. So you can see how the problem would be right. The things that you carried it keeps getting reset back to normal so make sure the reset is above your CSS. Okay. And I got my style, there's nothing in this one. In my CSS reset. I'm going to paste the erIC Reese one. Not normally copy. I'll show you this now because you're like it's a bit weird you're gonna find websites to have it and when we later on do things like Bootstrap um that is going to do it for us so we kind of it's nice to introduce it now you can kind of see what it's doing what it says. All of these tags. The margin 0000. Just get rid of everything please. Remember the ols we had, where were they in there somewhere there they are there the ordered list in order lists, a list-style none get rid of the bullet point and the little number the beginning just clear it all off please. Alright and that's gonna be you're gonna close him down now save him first and now nothing's gonna look changed but I've got this little style set reset in the background doing its thing So when I add in each one practicing our little shortcut there, save it. I'm going to open it in a browser, turn it off, turn it on there. It is there a little H. One but he's nice and small and he's not instyle's alright, we're going to get rid of the H one. He was just a little placeholder and we'll do commenting just to make it really clear for ourselves. We did commenting over here, remember we did stuff and then we wrapped it up in those tags. Remember it is command forward slash okay on my keyboard or you just have to type the forward slash the asterix okay for html. It's a different bit of code. So what I want to do is say that this is eric Mayers CSS reset just to help me later on my future self to go, yep, that's what that is. Okay, so but I can't just leave it like this. Okay, I need to wrap it in my tag, you can use the same shortcut command forward slash on my mac control forward slash on a pc and you can see html commenting is a lot bigger. You need to put in square brackets, exclamation mark, two Hyphens and the other side is just two hyphens and angle brackets anyway, so once you've got it in there, this is really handy so I can be just a little bit more specific with my night labeling. This is my own style sheet. Let's separate them out with returns because that's the way daniel rolls and document title we almost forgot about it's called raw cycles and it is bike repairs in Dublin. Nice, juicy keyword rich title there to do a save all and I will see you in the next video.