Home / Programming MCQs / HTML MCQs / Question

R

Ram Sharma • 188.81K Points
Coach

Q.  Which attribute is often used to point to a class name in a style sheet?

(A) style
(B) css
(C) src
(D) class
Explanation by: Jatin Dubey
Class attribute is used to point a class name in stylesheet. 

For example:- 
<div class="Myclass"></div>

How to write CSS for div class. 

<Style>
. Myclass {
Margin:40px;
Padding:40px;

}


</style>

You must be Logged in to update hint/solution

Discusssion

Login to discuss.