10th Class Computers Working with CSS Class Selector

Class Selector

Category : 10th Class

*   Class Selector

 

Class selectors have different classes allowing the same element to have different styles. Basically it is used to specify a style for a group of elements. For example, all elements of class student will be center-aligned:

code. Student (text-align: center;)

 

* ID Selector

ID selectors are assigned individually. Basically it is used for specifying single, unique elements. An ID selector is assigned by using the indicator "#" to precede a name. The following code snippet shows how to assigned ID selector:

P1
{
text-align: center;
color green;
}

You need to login to perform this action.
You will be redirected in 3 sec spinner

Free
Videos