Quote:
Originally Posted by rosshalde
so, a class is completely made up? but there are only certain attributes (they are given, not able to be made up)?
|
Exactly. And "class" is an attribute, with which you assign a class to an element.
Quote:
And when you style something...you can style both a class and an attribute? or just a class?
|
Just a class, although with CSS you can use attributes in a selector, so that a particular styling affects elements with or without it. The syntax div.myclass in the CSS means
any <div> tag with class="myclass". Other attributes are selected with a different syntax.
Quote:
Originally Posted by Toxaris
You use classes to identify parts of your HTML to which attributes need to be applied.
|
I think you are mixing terminology, which may confuse rosshalde. Let's call "attributes" the stuff in HTML. The stuff in CSS, to which you refer shall be called "properties" (what's inside the braces, such as "text-align"), or "selectors" (outside the braces, like "div.myclass").