HTML Tutorial | Background Color

HTML background-color is used to give different background color to any HTML element on web page.

  • HTML Background color are define by style="background-color:value;" syntax.
  • Value can given by color name (like blue), by rgb code (like rgb(255,0,170))or by Hex code (like #ff22aa)
  • It can be used in any HTML element inside Opening tag.
 <p style="background-color:red;"> Text background becomes red.</p>
 <p style="background-color:rgb(0,255,0);"> Text background becomes green.</p>
 <p style="background-color:#ffff00;"> Text background becomes yellow.</p>

Best Use:360p or more (480p or 720p)

Best Use:360p or more (480p or 720p)