How to change the default font type color size on a website using HTML & CSS

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

0
0

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

Transcript

Hi there, this video we're going to talk about the default font, and changing it, because by default it is black, and it's Times New Roman. We want to change that for every tag that's on the site, rather than doing it individually. Up until now we've been doing it per tags. So H1 is now Arial, and then the P-tag is now Arial. Let's just do it once for the whole site. It's pretty easy, the short version is, just add it, Font family to the Body Tag, job done . Now why is this video so long? Because I want to talk about Specificity as well, so hang around for that. Yeah, let's get going. 

So we've got our default font, it is Times New Roman, and black, and it is 16 points, that's the default. We want to change that, because what we did in the last project, is every H1 we made Arial, then we made the P-tag Arial. So we individually did it, but it'd be great just to change them all by default, and it's really easy. We use the body Tag. Body Tag is the whole thing on the page. So in this tag here, we need to say, the font is family, and it's going to be Arial, in this case. We'll do fancy fonts in the next video, but that now will be this, the Heading, so we got an H1 over here, where is he? There it is, an H1, the P-tag, they're all Arial, plus I want the default for the site to be a color of white. Not wheat. 

So that's what you need to do, kind of the beginning of everything, or beginning of a website, it's just throwing some of that kind of overall default stuff, and then later on you can kind of override it, so let's say that-- I want to kind of talk about Specificity again in CSS, because this is quite generic, it's at the top, the Body tag, everything's in the Body tag, so this is kind of very generic. So all you need to do is put something very specific, so, like an H1, to say, actually I want the H1 to be a different size. So we're going to go, font, font size, even, and we're going to pick like 80 pixels just because, because at the top, actually we didn't set a size up here, did we? 

Let's say we want to change the color of it, instead of the font size. We're going to say, we're going to use a font, oh, we're going to use a color of, let's say, just, I'm going to use-- the cool thing about VS code is that, because I've used these in the code earlier on, it suggested them to me. So I'm going to use, oh, not any one of them, but you get what I mean. So I'm going to make it black now. So at the top it said be white, but down here it said, be black, and because this is more specific, body generic, H1 is a little bit more specific, it's going to override it. 

Now when there's not a really clear specificness to it, say you've got two H1s, this ends up happening, it seems dumb now when they're right next to each other, but when you've got a really long CSS document, or that you're using somebody else's site, and you don't know where, if somewhere in this code the H1s been turned, made white, or black, or purple. You just can't work out where, all you need to do is, further down the cascade, so it's a cascading style sheet, the browser reads it from the top to the bottom, and if there's things that are equally specific, then the last one wins, so down here if I say, be red, this one will win because it's after this. 

So the top, it's being white, like it's going through some, I don't know, it's been told lots of things, at the top it says, be white, everyone be white, and it says, be black, and then be red, and the red will win because it's further down the list. The H1 will win over the Body Tag every time, doesn't matter where it is, because it's more specific. Let's test that out, let's grab the H1, let's cut it, so it's not down there anymore, it's just above everything. Here we go, paste it in, wrong way pasting. Paste it in, save it, and it should still be red. 

So it's a mixture of the flow, the cascade, and it can be troubling sometimes, because you're like, you're throwing things in everywhere, and you're like, "Why is it this? I've told it to be white." It's because it's the last thing in the cascade. So it's a mixture of the flow, the cascade, the waterfall, coming down to more-- and then a mixture of specificity. It's a hard word to say, that one. 

So I'm going to get rid of this red, and I'm going to change the color back to white, and just leave the font size there. Let's get into the next video, where we start adding some fancier fonts, because we're all tired of you, Arial. It's time to go, and I'll see you in the next video.
  • Powered by Marvin
  • Terms of use
  • Privacy policy
  • © Bring your Own Laptop Ltd 2025