0 votes
in CSS by
What are the differences between the class selector and id-selector.

1 Answer

0 votes
by

The overall block is called a class selector, but a single element that is different from others elements is called an id selector.

Example of class selector:

<style>
.center {
text-align: center;
color:red;
}
</style>

Example of id selector:

<style>
#para1
{
text-align: centre;
color:red;
}
</style>
...