Class Selector
applies styles to the content of all those elements. For example, if there are span and div
elements in a Web page with their class attributes set, the style specified for the class
selector will be applied to both the elements. A class selector starts with a period followed
by the value of the class attribute.
The style will be applied to both the places where the values of the class
attribute have been set to planets. If the style is required to be applied to only the <div>
element then class element would be used as shown in Code Snippet.
No comments: