For setting the HTML style CSS is provide "id" & "class" to define your styles in SELECTOR section .
1. This is used to style for many HTML element with the same class.
2. The class selector is defined as ".".
example :
p.center {text-align:center;}
The ID
1. The id is used to specify a style for a unique element.
2. The id uses the id attribute of the HTML element, and is defined with a "#".
example:-
#style
{
text-align:center;
color:red;
}
{
text-align:center;
color:red;
}
The class Selector
Class is used to specify a style for group of element1. This is used to style for many HTML element with the same class.
2. The class selector is defined as ".".
example :
p.center {text-align:center;}
No comments:
Post a Comment