CSS Selectors
Basic Type of Selectors:
- By Tag Name Selector
- Class Selector
- Id Selector
- Descendant Selector
1.By Tag Name Selector:
<style>
h1{
}
p{
}
div{
}
</style>
2.Class Selector:
<style>
.heading{
}
.para{
}
.Box{
}
</style>
3. Id Selector:
<style>
#heading{
}
#para{
}
#box{
}
</style>
4. Descendant Selector:
<style>
#heading a{
}
.list p{
}
#box a{
}
</style>