Example Here:
Example
Here:
Selecto
r
There are seven types of Selector
You can define selectors in various simple ways based on
your comfort. We have Seven type of selector let me
Define these selectors one by one.
Class Selectors
Id Selectors
Descendant Selectors
Child Selectors
Attribute Selectors
Tag Selectors
Grouping Selectors
Example
Here:
.class-name {color: #c20000 ;}
You can apply more than one class selectors to a given element.
Consider the following example:
Example
Here:
<div class="class-name" >Add your externa
file link on html document </div>
Selecto
r
The Id Selectors
You can define style rules based on the ID attribute of the
elements. All the elements having that Id will be
formatted according to the defined rule.
Example
Here:
#id-name { font-siz:40px;}
{
color: #36C;
font-weight:
normal;
font-size:20px;
Selecto
r
This define style rule will be applicable to h1, h2 and h3
element as well. The order of the list is irrelevant. All the
elements in the selector will have the corresponding
declarations applied to them.
Example
Here:
.class-name #content, #footer,
.class2 .class3 #supplement
{ {
color: #36C; color: #36C;
font-weight: font-weight: normal;
normal;
font-size:20px; font-size:20px;
Visit Us : Attitude Academy