top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

How To Use Class Selectors to Differentiate Tag Instances?

0 votes
69 views
How To Use Class Selectors to Differentiate Tag Instances?
posted Aug 6, 2014 by Devyani

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

You can define style rules based on the class attribute of the elements. All the elements having that class will be formatted according to the defined rule.

.black {
  color: #000000; 
}

This rule renders the content in black for every element with class attribute set to black in our document. You can make it a bit more particular. For example:

h1.black {
  color: #000000; 
}

This rule renders the content in black for only

elements with class attribute set to black. You can apply more than one class selectors to given element. Consider the following example : <p class="center bold"> This para will be styled by the classes center and bold. </p>

answer Aug 14, 2014 by Vrije Mani Upadhyay
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...