English

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: - Computer Applications

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?
2024-2025 (March) Board Sample Paper
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×