Header Ads

Class Selector






A class selector matches elements, whose class attribute is set in an HTML page and
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.




Disqus Shortname

Comments system

Powered by Blogger.