How do you define a class? What is the difference between a class
and id selectors? What would be your consideration when deciding
whether to use or not a class or id selectors?


Sagot :

Answer:

Class selector is created by adding a period and a name of your

choice to name a class. An id selector is created the same way

except that it uses the number sign (#) instead of a period. An

id is a unique identifier and should be assigned to a single

instance of an element. Class selectors are used more over id

selectors in almost all cases. Use a single word in naming a

class or id. It should always start with a letter; the use of

special characters is discouraged.