- 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>
2 Antworten
+ 2
Please share your code
+ 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?