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.
'Class' refers to a set of CSS attributes that can be assigned to multiple divs to give them all the same attributes. If a user wanted to display 4 divisions of his page (lets say, 4 spots on his webpage where he displays images) with the same font and border, he would make a class in CSS (ex: class1) and give it the desired font and border attributes, but now all he would have to do for those 4 divs is assign it the class (<div class='class1'>). This way, if he decides to change his border or font type for some reason, he only has to go and edit that one class attributes, instead of having to go through and edit each individual div CSS. A class in CSS is created using .classname{}
'ID' is also like Class there is probably no difference, you can use ID the same way as a Class and assign CSS attributes to multiple div or elements, but after CSS3 you can assign multiple Classes to a single element by separating them with space but can't assign multiple Ids. Id is meant to be used for javascript, if want to do something with a div using javascript then you can point to that div using id. So its better to use Classes for CSS and ID for javascript.
In HTML, the class attribute is an identifier used on one or more elements on a web page. On the other hand and ID is an identifier that is unique and applies to only one element instance. In other words, a class can appear on multiple elements throughout a single document whereas an ID can be used once and only once in the document. In CSS, a class selector is declared using the dot symbol (for example .class-name) whereas an ID selector is declared with an octothorpe (#) symbol (for example #id-name).
There are 2 ways to identify an element in HTML, ID and CLASS. Id can be referred by # and class by .
Class tag and ID tag both are used for reference. Id tag is referred by # symbol while class by dot symbol.
Period which specifies to a class using (.) or dot operator Where as hash or # specifies to id of a particular attribute of HTML tags
"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 . . .
The REL attribute in HTML is a shortened version of "relationship." REL attributes are used to define the relationship between one file and another.
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 the "BGCOLOR" attribute in the HTML tag.
Period which specifies to a class using (.) or dot operator Where as hash or # specifies to id of a particular attribute of HTML tags
A tag is a declaration of a HTML object whereas an Attribute is a property of an object.
"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 . . .
The REL attribute in HTML is a shortened version of "relationship." REL attributes are used to define the relationship between one file and another.
DHTML combines HTML, JavaScript, the HTML DOM, and CSS.
hello
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 the "BGCOLOR" attribute in the HTML tag.
You can change HTML attributes easily. Using Dom that can be done using JavaScript.
This is not a tag. It is an attribute and part of CSS
Align is an attribute included in the HTML format. You can align the position to be right, left or center.
http://dhivacpt.blogspot.com/2007/10/difference-between-ddr1-and-ddr2.html