Home > Net >  How do I set a background color to the text inside anchor tag in html?
How do I set a background color to the text inside anchor tag in html?

Time:10-27

I want to set a background color to the innertext of a certain <a> tag:

<i >&ensp;</i><a  href="/filename.apk" download>You can install this app from here</a> 

In my css I wrote this rule:

 .app-info{ background-color: "rgb(255, 214, 127)";}

But the background color isn't showing in my HTML page. Why?

CodePudding user response:

in the css rgb value won't come in the quation marks

.app-info{ 
       background-color: rgb(255, 214, 127);
}

it will now change the background color of the anchor tag

  •  Tags:  
  • html
  • Related