Set web page background color to black - HTML CSS CSS Property

HTML CSS examples for CSS Property:background-color

Description

Set web page background color to black

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

body {<!--from w  w w .j  a  va  2  s  .c  o  m-->
   background-color: #000000;
   text-align: center;
}
#main {
   width: 1000;
   height: 600px;
   background-color: blue;
}


      </style> 
 </head> 
 <body> 
  <div class="body"> 
   <div id="main">
     Hi 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials