How to add a horizontal rule using HTML5 & CSS3 in VS Code

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

Hey everyone, nice simple one. We got no line, now we've got a line. Super simple, we're going to add a border to the box of the heading, we'll talk about the HR tag as well. Let's jump into VS code and make it happen. 

First up let's talk about, the line we need is this one here, right? So on my mock-up I've got this line that runs across the document, up the top here, kind of like between the Header and this Main Hero box here. It's kind of like a light gray. I've picked that color there, 'CCCCC'. Let's show you how to do it. 

So the bad way, well it's not a bad way, just doesn't seem to be used that much very often, and it has some drawbacks, so between the Header and the Main, I'm just going to stick it right here in the middle, and we're going to use this tag. If you've done any of my previous courses, this HR tag is what we use, the Horizontal Rule, and it appears on the page, it's perfect, it's got a lot of styling on it, which is probably the biggest problem with it. Weirdly about an HR tag as well, it doesn't have a closing HR, doesn't need it. I don't know why, just magic, doesn't need to do that whole thing. 

There's a couple of tags that do that. So the reason we don't do that is, I don't know, in the HTML5 documentation it says, "Hey, we're not using this anymore as a ruler, we're using it as, like a content break, and we're going to hide it." You should make it so it's styled, so you can't see it, and it's used to break up content. It still works but let's just not use it anymore, and I'll show you the easiest way to get around it; super easy. 

In our case-- because the other drawback with HR, it's something on your page, and I'm going to have to have this on every single page, underneath every Header. So a nice way to get around it is either we're going to add a border, like we did for the buttons here, on the bottom of either the Header or the top of the Main. Either way will get us to the right place, let's find the Header. Oh, it's kind of weird. You'll notice how the bracket was there, it's not broken, it's just, it annoys me. I like it to be separated out like that. 

So we're going to use Border. I spelled it right today, Border-bottom. And just like we did before we can put a kind of a row. So the first one is how white it is, and then it's going to be solid, and then it's going to be gray. I love this, you can use gray with an A or an E, same color. I don't think there's even American or English versions of the spelling. I think just there's two spellings of the same word. I'm probably wrong about that, but anyway, there you go. I've got this-- oh there is a light gray for both of those. Both spelled the same, you can have both the spellings. 

You can see, it's doing the exact same job, and it's just a more simple thing, whereas the other one had all this kind of really weird depth to it. The HR has some weird styling to it, kind of old-school. We've got solid, you've got dotted. There's lots of different stylings for it. It's turned pretty small, make it nice and big so you can see it, in case you want giant dots, but that's it, nice short video. Easy to do lines, don't use the HR anymore. Just find one of the boxes that applies. 

Now there are going to be times when you're like, "Actually I want a small little line across," and you might use the HR. You might just style it to get rid of all the extra bits. I'm not going to cover how to remove all the kind of built on styling for it. You might find that yours is actually nice, a straight line using the HR, because the CSS reset you're using might have cleared it up, but the one we're using from Chris Mayer is not. All right, that's it, I'll see you in the next video.
  • Powered by Marvin
  • Terms of use
  • Privacy policy
  • © Bring your Own Laptop Ltd 2024