Question
Option 2 : red, because an id selector outranks any number of class selectors. / लाल, क्योंकि id चयनकर्ता कितनी भी क्लास चयनकर्ताओं से ऊपर होता है।
Detailed Solution
सही उत्तर red, because an id selector outranks any number of class selectors. / लाल, क्योंकि id चयनकर्ता कितनी भी क्लास चयनकर्ताओं से ऊपर होता है। है।
Question:
Two rules target the same heading: '#header .title { color: red; }' and '.title.big { color: blue; }'. The heading sits inside the header element and carries both classes, with no inline style. The heading appears / दो नियम एक ही शीर्षक को लक्षित करते हैं: '#header .title { color: red; }' और '.title.big { color: blue; }'। शीर्षक header एलिमेंट के भीतर है, दोनों क्लासें धारण करता है, और कोई इनलाइन स्टाइल नहीं है। शीर्षक दिखेगा
Correct Answer: red, because an id selector outranks any number of class selectors. / लाल, क्योंकि id चयनकर्ता कितनी भी क्लास चयनकर्ताओं से ऊपर होता है।
Specificity compares id count first; one id outweighs any number of classes, and source order only breaks ties between equal specificity. / विशिष्टता में पहले id की गिनती की तुलना होती है; एक id कितनी भी क्लासों से भारी होता है, और स्रोत क्रम केवल समान विशिष्टता की बराबरी तोड़ता है।