Tip:
Highlight text to annotate it
X
What's going on everybody? Welcome to this tenth tutorial on HTML5 and CSS3, my name
is Jack Jenkins and this is academy of one. We are gonna talk about divs, comments and
gonna be wrapping up this unit. In this lecture we are gonna talk about four things. First
off, what is a Div? Secondly what are comments. Third, we are talking about whats in the next
unit. And lastly I'm going to talk about more sources to hone your HTML5 skills. Div just
stands for division. And it is just a gigantic container element. Remember what that means?
A container element does nothing on it's own but gives you a reference point for your css.
We are going to see the div tag a lot when we start working with css. It is a double
tag. And it has two attributes. Either id or class. A lot of people don't know when
to use class or when to use Id. So a lot of people end up fighting when to use which.
I'll make it nice and simple for this class. You should use class when you are using the
classes value multiple times. What I mean by this is if you're going to have a blog.
You're going to have multiple blog posts right? Not then you're just going to make it a pain
in the *** for everyone else. Just clicking through ten pages. I hate that. Why people
have blogs that. I'm sorry I... just calm down Jack. Calm down. Alright, I'm back. You
should only use the Id tag when you are going to be using that value once. For instance,
If you want to have text thats, I don't know, Tahoma, pink, and bold then... you shouldn't
probably use that at all. But if you want to then you should only use it once. First,
if you don't know what comments are. Comments are, basically little snippets of not code
that tells you how the code works. What I mean by this is usually more complex languages
such as c++ or Java, you put in code or you put in comments to help you explain you code.
For instance, If I have like, I = 0. Then you put a comment that says: "I'm initializing
I to equal zero". Alright you will never do that but, It's an example what do you want
from me. Another cool thing you should do with code [comments] Is you can hide hidden
[No? really?] messages. For instance, go to the Foo Fighters site and see if you can find
the hidden message in there. You'll be surprised. Of course, they are not visible in the actual
browser. However, if you click view source you can see the comments. Here is a little
snippet of a multi-line comment. The single line comment is just // instead of