Answers for "how to add a good html and css background"

8

background color css

html,body {
  background-color: red;
}
Posted by: Guest on April-25-2020
5

background image html

<!-- Background images are better implemented in CSS -->
<!-- but here is how you could do it in HTML in a pinch -->

<head>
  <style>
    .background {
      background-image: url(https://cleananddelicious.com/wp-content/uploads/2016/03/Avocad0-CD.jpg);
    }
  </style>
</head>

<body>
  <div class=background>
    <h1>The background of this div will be an avocado</h1>
  </div>
</body>
Posted by: Guest on February-18-2020

Code answers related to "how to add a good html and css background"

Browse Popular Code Answers by Language