View Single Post
Old 01-24-2013, 09:08 AM   PM User | #8
xhtmlchamps1
New to the CF scene

 
Join Date: Jan 2013
Location: Hyderabad
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
xhtmlchamps1 is an unknown quantity at this point
code for class and I.D

The id selector is used to specify a style for a single, unique element.
The id selector uses the id attribute of the HTML element, and is defined with a "#".

The style rule below will be applied to the element with id="para1":

Example-

#para1
{
text-align:center;
color:red;
}

Now for Class-

The class selector is used to specify a style for a group of elements. Unlike the id selector, the class selector is most often used on several elements.

Example-
.center {text-align:center;}
xhtmlchamps1 is offline   Reply With Quote