हिंदी

How do you add a background color for all <h1> elements?

Advertisements
Advertisements

प्रश्न

How do you add a background color for all <h1> elements?

कोड लेखन
लघु उत्तरीय
Advertisements

उत्तर

To set the background colour for every h1 element, we build a rule for the <h1> tag and use the background-color feature.

For example, we define the rule as follows to make all <H1> elements’ backgrounds blue:

h1 { background-color : blue ; }
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 6: Cascading Style Sheets (CSS) - Assignment [पृष्ठ २७५]

APPEARS IN

सुमिता अरोरा Computer Applications [English] Class 10
अध्याय 6 Cascading Style Sheets (CSS)
Assignment | Q 1. | पृष्ठ २७५
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×