Advertisements
Advertisements
Question
Anshu, a class X student, is writing CSS code for making all <span> elements bold. Choose the correct code for getting the desired output from the following options:
Options
span{text-size:bold}
span {font-weight:bold}
<span style="font-size:bold">
span{text-size:bold}
MCQ
Solution
span {font-weight:bold}
Explanation:
The thickness (weight) of the font can be specified using CSS's font-weight property. The text appears bold when the font-weight is set to bold. This is the proper approach to use CSS to apply bold styling to every <span> element.
shaalaa.com
Is there an error in this question or solution?