HTML selector types: Tags vs Classes

Course contents
SECTION: 9
How to backup 4:44
SECTION: 17
Finished 1:58

Questions

You need to be a member to view comments.

Join today. Cancel any time.

Sign Up

Course info

53 lessons / 5 hours

Overview

NOTE: this course uses Bootstrap 3. Dreamweaver has recently updated to Bootstrap version 4. You can change it back to 3 using the ‘New Document > Bootstrap > Preferences'. Please do this before starting the course.

Some versions of Dreamweaver will require you to download the specific Bootstrap version you want to use and link it within the site. You can download Bootstrap 3 here: http://getbootstrap.com/docs/3.3/

Hi - my name is Dan and I’ll be leading you through this course on how to Make money building mobile friendly websites using Dreamweaver.

I built this course for the visual person, the right brained person. We won't hide from code but we'll use all the visual tools that makes Dreamweaver so amazing.

These are the skills you’ll need to become a professional web designer. You’ll learn how to make responsive websites in Dreamweaver as well as learning what to charge and how to manage a website project.

We cover everything you need to build your first website. From creating your first page through to uploading your website to the internet. During the course we’ll create a website for a mock creative agency - creating mobile and desktop versions. See our example here:

I’m a Dreamweaver Certified Instructor and an Adobe Certified Web Specialist.

With exercise files you can download and work along with me. At the end of each video I have a downloadable version of where we are in the process so you can compare your project with mine making it easy to see where you might have a problem.

I’ll be showing you how to work with Dreamweaver to easily create HTML & CSS websites. How to create mobile and tablet versions of your design and how to test your website on your phone.

I’ll be teaching you how to create navigation bars, how to work with responsive images and favicons.

We’ll work with Dreamweaver’s new Bootstrap integration to easily add carousels, tabbed menu’s and accordions. Even easier you’ll learn to impress clients by embedding videos, calendars, maps, event ticketing & social sharing options. 
 
 Know that I’ll be around to help - if you get lost you can message in the forum and together we’ll get you back on track.

Now it’s time to upgrade your skills, get that better job and impress your clients.

What are the requirements?

  • You'll need a copy of Dreamweaver CC 2015 or above. A free 30 day trial can be download from Adobe here.

  • No previous Dreamweaver or web design experience is necessary.

  • If you're not sure if this course is right for you. Email me what you’re trying to do and check if you’re on the right track.

What am I going to get from this course?

  • 60 lectures 3 hours of content!

  • Forum support from me. 

  • All the techniques used by professional website designers.

  • Ways to preview your designs straight to your mobile device.

  • Firm understanding of responsive web design.

  • Professional workflows and shortcuts. 

  • A wealth of other resources and websites to help your new career path.

What is the target audience?

  • YES: This course is for beginners. For people who prefer not to work in code. Aimed at people new to the world of web design. No previous Dreamweaver experience is necessary. People with knowledge of previous versions of Dreamweaver CC 2014 and below will also get great value from this course as the software has changed so much.

  • NO: This course is NOT suited to people experienced in using HTML & CSS. If you prefer to work in code only then this course isn’t right for you.

Course duration 5.5 hours + your own study.

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.

Downloads & Exercise files

Download Exercise Files

Transcript

Hi my name is Dan and in this video we are going to look at the difference between tags and classes. Now we have looked at classes quite a bit through this class and we kinda saw them when we were down here, we applied a class to this image here. And it was a full stop at the beginning and then it said image responsive. We also did it for down here, we made it centered. We applied something called center, a full stop and then a center hyphen clock. Now that is considered a class.

 

Now a ta, a tag is something that’s predefined in html and that is things like the p, can you see here? There’s the p tag already made. Now tags are premade in html. A p tag is a p tag, you can’t have a q tag and get it do the same thing. P tag is a bit of paragraph text and h1 is what is considered a heading 1, an a tag is what we use for doing hyperlinks. So they’re predefined by html. Whereas our classes, we get to name and create ourselves. We get to call them, say for what we did for the banding in the back here. We called it band hyphen hero. And for that we got to give it a name and decide what it looks like. So p tags quite generic and classes are quite specific. Now the reason we need both is say I've got two bits of p tags but I want them to be different.

 

I want this text to be very different from the p tag in this one. If I style the p tag, great, but they would be exactly the same. So what we style some kind of generic styling to the p tag, it might just be the font and the colour. And then we get to add classes to the individual pieces of text to kind of tweak it or change it a little bit. So lets go through and do that, lets start at the top here and let’s look at this thing, which says lets make things awesome. And what we are going to do is change it from a p tag to a heading 1. So it’s going to be the main heading on the page. Now you can do it a few different ways, down here you can see it’s a paragraph tag; I could switch this to a heading 1. You will notice that it changes, I might have to have a refresh, I do. But it becomes big and bold, that’s the default for h1s. We can go and style it, that’s fine. Or I can click it up here, there’s one here which says h1 or p tag, it doesn’t really matter which way you go about it.

 

Or say you prefer to do it in code, you can see down the bottom here, if I click in here, there’s my h1, it kind of highlights it down here in code view, it does normally. If it stops doing that, it does it for me, its stopped working, sometimes Dreamweaver needs a file, save all and then a close and a reopen. Actually it didn’t need to reopen in this case, so there it is there. I click on my h1 and it grabs it in the code there. So if you prefer to work in code view, you can change it remember in these two options or go into the code view here and change the beginning. Say I want this to be an h2 now, its now an h2, except I need to do the closing as well. So you got to make sure you do that beginning and the end. If I want this back to a p tag, watch this. Delete hat, you are a p tag, make sure you leave the forward slash there, put in the p tag and its back to being a p tag.

 

So either way you want to do it, I'm going to put him back to h1, this is how you change the tags. So what I want to do now is I want to style this tag. Lets make sure we are all where we are. And lets go into our css designer view. Lets put our style in our main.css, and here is its selector. It might default to it, its defining too much by default. You can delete everything here you just want the h1. Or you can use your up and down arrows on your keyboard. Press it up a few times, it get back just to style h1. I don’t want to style all the rest of the stuff, just him. So, I'm going to turn show set off, so it gives me all the things I want to do to it. And what I'm going to do now is I'm going to go through and I'm going to pick a, lets leave the, go to the type, lets pick a colour. And the colour for this one is going to be the same as, what are the boxes down here, that guy here. I'm going to steal it from the list of colours that we've got, there’s our h1. I'm going to copy it, make sure you get the hash as well. That’s going to Dreamweaver, h1, the colour, I'm going to replace it down here, you could pick any colour you like. And you can you see that? I've styled the h1, and that’s going to style all the h1s on every page. Generally you only need one h1 per page. And now I'm going to go through and change the size. So it says font size medium, I'm going to change it to pixels and instead of zero pixels I'm going to make this one lets say 20, actually let’s make it a lot bigger, 30, great.

 

So that’s how you go and style a tag. Now lets do the same thing for the p tag and have a look. So the p tag down here I want to style, so I've clicked inside here, kind of sometimes clicking this kind of helps it know when we click new selector, it kind of guesses the right one. If it doesn’t, say it guesses the total wrong one, you can just type in p and click enter. It doesn’t really matter what you’ve got selected over here, just type it in, hit enter and I'm going to go through to my font and I'm going to change the colour to white. So I've styled all p tags, it looks like I've styled just this one but look down here, anything that is also a p tag, can you see he is white now as well? All these guys down here are white, remember there were words in here, print; they’re white so they’re really hard to see. So by changing the tag, you change all instances of that p tag.

 

Now you can see why classes are going to be quite useful. Say that I want just a little bit of this text to be a different colour, so what I'm going to do is lets say I want this, so lets just say this p tag at the top here, I want all the generic p tags to be that size, that’s fine the way it is, but I want this top one to be a little bit bigger to match my design in Photoshop. You can see its actually a bigger font and even bigger down here. So what I'm going to do is I'm going to create a class. So if I change the p it’s going to change them all, so lets create a class. Its in the main.css, lets click on selectors, I'm going to make one member, remember full stop goes in front, that makes it a class and I'm going to call this one first paragraph. Actually I like putting text at the front of it, just to make it easier to find, I might call it text and call this one paragraph, lets call this one first para. And what I want it to do is I want it to change the size.

 

So lets grab the font, lets grab the font size, lets pick a pixel and lets go to 16. Now nothing changes over here right, even though I had it selected, what we need to do with a class is, once we've created it, is go over here, can you see my p tag? You can add a class and hopefully if you put a full stop in and you start putting in text and a hyphen and then you put in f for first and can you see? It’s gone and applied this one. And all he does, that little class, is change the font size. But you could get it to do all sorts of things you want to do separate from the rest of the p tags. Can you see? This guys still the original size, same with the guys down the bottom here. So you can leave the p tags alone, just do some broad kind of style changes and then do some real specific ones using classes.

  • Powered by Marvin
  • Terms of use
  • Privacy policy
  • © Bring your Own Laptop Ltd 2024