How to color the background of a webpage using the body html tag

This lesson is exclusive to members

Course contents
SECTION: 4
Project 2: Bike Repair Website 6:12:48
SECTION: 6
Project 4: Bootstrap Yogurt Website 3:35:39

Questions

You need to be a member to view comments.

Join today. Cancel any time.

Sign Up

Course info

128 lessons / 17 hours 5 projects Certificate of achievement

Overview

Hi there, my name is Daniel Scott and together we’re going to learn how to build professional responsive websites. which look good on mobiles, tablets and desktop screens.

We will build 4 sites together...
  • a simple but elegant restaurant website.
  • a bike repair website. 
  • a responsive portfolio website.
  • a Bootstrap website.  

We cover everything you need to build your first website. From creating your first page through to uploading your website to the internet. We’ll use the world’s most popular (and free) web design tool called Visual Studio Code.

There are exercise files you can download and then work along with me. At the end of each video I have a downloadable version of where we are in the process so that you can compare your project with mine. This will enable you to see easily where you might have a problem.

We will delve into all the good stuff such as how to create your very own mobile burger menu from scratch learning some basic JavaScript and jQuery. 

 You will...
  • Learn how to work with responsive images and icons. and stunning full screen background images and probably one too many gradients. 
  • Learn how to create forms and to choose great fonts for your website. 
  • Learn how to work with Bootstrap 4 to easily add carousels, cards and complex looking menus. 
  • Setup a domain name with hosting so that your website is live on the internet for others to see.  

There are fun class projects for you to work on which will enable you to practice what you learn. By the end of this course you’ll have a great understanding of important web design topics like HTML5, CSS3, Flex box, Responsive design and Bootstrap.   

If that all sounds a little too fancy - don’t worry, this course is aimed at people new to web design and who have never coded before. We’ll start right at the beginning and work our way through step by step. 

Who am I? 

I’m Dan, and I’ve been building websites for about 15 years now. I am award winning instructor, and have won a MAX Master award for the last 2 years in a row at the prestigious Adobe Max conference.

Time to upgrade yourself?
Sign up for the course and let’s learn how to build responsive websites.

Course duration 16 hours 42 mins
Daniel Scott

Daniel Scott

Founder of Bring Your Own Laptop & Chief Instructor

instructor

I discovered the world of design as an art student when I stumbled upon a lab full of green & blue iMac G3’s. My initial curiosity around using the computer to create ‘art’ developed into a full-blown passion, eventually leading me to become a digital designer and founder of Bring Your Own Laptop.

Sharing and teaching are a huge part of who I am. As a certified Adobe instructor, I've had the honor of winning multiple Adobe teaching awards at their annual MAX conference. I see Bring Your Own Laptop as the supportive community I wished for when I was first starting out and intimidated by design. Through teaching, I hope to bring others along for the ride and empower my students to bring their stories, labors of love, and art into the world.
True to my Kiwi roots, I've lived in many places, and currently, I reside in Ireland with my wife and kids.

Certificates

We’re awarding certificates for this course!

Check out the How to earn your certificate video for instructions on how to earn yours and click the available certificate levels below for more information.

Downloads & Exercise files

Download Exercise Files Download Completed Files

Transcript

Hi there, in this video we're going to go from this plain old white background to this toxic green color. Basically all I'm going to show you, how to color the background using your HTML Body Tag, and then I go off in a bit of a tangent to discuss RGB colors and Hexadecimal colors, and how to use this little Color Slider picker thing. It's all ahead of you in this next class.

So now we need to color this background part here, so this white, we can't color just the container, because the container's just sitting here in the middle. So we need another, I imagine if there was a tag, that wrapped around right around everything on a page. Look at that, Body Tag, it's already there. And this is the tag that you style, to change the complete background color. Now we could put the body down the end here, but it's very common to have it at the top. 

So body, remember, it doesn't need a period of a full stop in front of it. Just type 'body'. And we're going to add our background, I've used this loads of times now. Background color, there he is. Now we're going to pick one of these random colors for the moment. Coral. Let's check out what coral is. And it's, yeah, kind of like it, I kind of do. It's not working with these colors, but that is how to change your background color. We'll do background images later on in the course, but for the moment I want to focus a little bit on color, because using coral and red, and Indian red and ruby red, there's lots of different kind of naming. I don't know who's in charge of naming those colors, but hey, that's what they are. 

Often what we want to do is, just hover above it with your mouse, I'm not doing anything, I'm not clicking on it, I'm just hovering above it. It's kind of weird in VS code. Sometimes it turns on, and you're like, sometimes you just can't make it turn on even though you really want to. So just hover above it, see, what we turned on. And then down here we can do a couple of things. This, kind of far right slider is the Hue. So drag it to get it roughly in the zone. 

So say we want to change this to, I'm going to say bright green, just because. So we get it in the bright green range and we go- do we want a bit more yellow? Yellowy green or a bit more of the bluey green. That's got the bluey green. Then over here is the opacity. So how see-through it is. For a background color you can't really have see-throughness, or opacity, because there's nothing to see-through to, but later on that will be useful. And in here, it's wherever this dot ends up. So you click, hold it, and move it around. So if I go up here, it doesn't matter what the Hue is, I'm going to have white, which is RGB 255 across all of them. 

So what I want to do is get back into it by hovering above it, and going back into here, grabbing the green. Getting the kind of bluey green. and then clicking in here, I'm just kind of getting it to where I feel it should look nice, and that's what I want to do. I'm picking a random color for the moment. Now if you just click off in the background or move your mouse away, you'll notice the colors change from being RGB, sorry, from a name to this red, green, and blue mixture, and those, red mixed with green, mixed with blue, makes our kind of crazy green color. Let's save it and let's test it in the browser. That's the wrong place. There it is, it's my green. 

Another way to do colors is to use Hexadecimal colors. So I'm going to delete all of that. Now this is for the people that know already. So let's say that you do know what a Hexadecimal number is. It starts with hash, '#', and often people will use a three or six digit code. I'm just going to fake one. So it turns out, if I hit those keys randomly on my keyboard I get a green. So it's either three or six digits, mainly six digits. And where do we get these colors from? They're actually made up of red, green, and blue. So the first two digits red, second two digits green, last two digits blue, you don't need to know that, but let's say that you're working with brand guidelines. Say you're working for a corporate client, they might give you this Hexadecimal number or the RGB number, and you can type in whichever works for you. 

For me, I'm working from this mock-up here in XD. We'll look at XD later on, but this code-- this color in the background. I've clicked on my name up here, don't worry if you've never used XD. We'll talk about it later on in the course. I click on this, and you can see, gives me my Hexadecimal number, or I could go RGB, and I could type those in. All this different kinds of web, like creation-- like design products, like you could use Photoshop, Illustrator, XD, or Sketch, to design your website, but you build it in VS code, and then just figure out what the color codes you want to use. 

That's the code I want, I'm going to copy it and go into VS code. And that my friend is the kind of dark gray that I want. Save it. Browser, that's the dark gray. The first bit was easy, we talked about adding the Body Tag, and then I went on a little bit too long about colors. Felt like it was the time to do it, but maybe it wasn't, maybe it's for later. We'll cover it again as we go through if that felt a bit fast. I'm back for lunch, I've had a coffee. Racing through the stuff. Slow down, Dan, take breaths. And I will see you in the next video, where I've taken away.
  • Powered by Marvin
  • Terms of use
  • Privacy policy
  • © Bring your Own Laptop Ltd 2024