mythusmage Posted June 28, 2006 Share Posted June 28, 2006 How is "id" defined? How is it used? How is "class" defined? How is it used?I see things like 'id= ""' and it tells me nothing. 'id= "text"' What does it mean?Tutorial Suggestion: Attributes: What They Are and How to Use Them Link to comment Share on other sites More sharing options...
pulpfiction Posted June 28, 2006 Share Posted June 28, 2006 Is this about how a CSS class or id is used in HTML?? Link to comment Share on other sites More sharing options...
Little Goat Posted June 28, 2006 Share Posted June 28, 2006 if you take the html tutorial, an the CSS tutorial, you will find out. Link to comment Share on other sites More sharing options...
Chocolate570 Posted July 2, 2006 Share Posted July 2, 2006 Well, it is kind of subliminal, but you basically learn it through reading the HTML and CSS tutorials on this site and going through other people's sources. But if you'd like a quick run down:ID's are suggested to be used only once in a page. ID's are used, in JavaScript, to reach an element through getElementById(). In CSS, ID's are used to format only 1 element with style sheets. They are set inside the tag, like this: <a href="" id="omg" title="" /> To select IDs in stylesheets, use this (if 'blah' is the id)#blah { property:value;}And that will format only that element. (remember the # sign)Classes are exactly like ID's, except they can be used multiple times over. To select a class, just use this:.blah { property:value;}And that will format all elements with 'blah' in their class= attribute. (note the '.')Hope that helps. Link to comment Share on other sites More sharing options...
joecoolaug Posted August 15, 2006 Share Posted August 15, 2006 If you read all the tutorials, especially the HTML and CSS ones, you can discover the meaning of them. It's actually hard to explain. I think you should go to them instead of me . Link to comment Share on other sites More sharing options...
aspnetguy Posted August 15, 2006 Share Posted August 15, 2006 If you read all the tutorials, especially the HTML and CSS ones, you can discover the meaning of them. It's actually hard to explain. I think you should go to them instead of me .joe please stop repeating answers others have already given and if you don't want to really answer their question please don't post anything. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now