- 1

span gives a blue box for h1 but not for h2 or others why?

here is the code <html><head><title>My log </title></head> <body><h2><span>My skills </span></h2> <ol><li>C language </li> <li> Learning html </li> <li> going to learn java</li></ol> <form> <input name = " " place holder=" "type="text"></input></form> </body> </html>

13th Jun 2017, 3:22 PM
2 Answers
+ 2
Please share your code
13th Jun 2017, 3:40 PM
देवेंद्र महाजन (Devender)
देवेंद्र महाजन (Devender) - avatar
+ 1
For span tag in blue box, add below CSS h2 span { background: lightblue; padding: 10px 20px; } Btw why you need span in the h2? Heading h2 tag can do the job?
13th Jun 2017, 4:05 PM
Calviղ - avatar