answersLogoWhite

0

An ID is used to define the style properties of a specific thing whereas a class is used to define something you may use multiple times. For instance, if you are going to make a loginbox you will use an id because you will only have one identical loginbox on the page whereas if you wanted every quote to be given the same style you would use a class, this would mean all elements with class=quote (after you define it in the CSS) would always style quotes to your needs. In short, you could use either as they have pretty much the same outcome, but organised CSS is good CSS so you are better off using classes and ID's as i have defined them above.

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

What is the difference between a period and a hash symbol in declaring CSS classes?

Period which specifies to a class using (.) or dot operator Where as hash or # specifies to id of a particular attribute of HTML tags


What is differences between tags and attribute?

A tag is a declaration of a HTML object whereas an Attribute is a property of an object.


How do you apply css code in HTML?

"class" is an attribute of most if not all HTML tags. To apply a CSS class to a tag, simply make the class attribute equal to that CSS class. For example, suppose you have a CSS class called bigRed that makes text large and red. If you want to apply it to a certain text, just put it in a tag surrounding that text. e.g. . . . but my <span class='bigRed' >car</span> was faster than . . .


What is the fullform of REL in HTML?

The REL attribute in HTML is a shortened version of "relationship." REL attributes are used to define the relationship between one file and another.


What is the difference between an HTML page and a dhtml page?

DHTML combines HTML, JavaScript, the HTML DOM, and CSS.


What is the difference between html and dhtml in hindi?

hello


Which attribute specifies the name of the image to display in HTML?

There is an attribute which defines the name of the image to be displayed. The attribute is called as ALT or alternate.


The color of a hyperlink that has not been clicked can be specified by setting what attribute in the BODY HTML tag?

The color of a hyperlink that has not been clicked can be specified by setting the "BGCOLOR" attribute in the HTML tag.


How do you change HTML attribute using HTML dom?

You can change HTML attributes easily. Using Dom that can be done using JavaScript.


What is the difference between DDR1 and DDR2?

http://dhivacpt.blogspot.com/2007/10/difference-between-ddr1-and-ddr2.html


Is width a tag in HTML?

This is not a tag. It is an attribute and part of CSS


How do you align in HTML?

Align is an attribute included in the HTML format. You can align the position to be right, left or center.