web-students

CSS Basics - Day 3

Background color and images

Background Color

Background Color

<style>
    body {
        background-color: green;
        /* background-color: aqua; */
    }

    div {
        background-color: blueviolet;
        opacity: .9; 
    }    
</style>
<div>
    <h2>This works</h2>    
</div>

Background Image

Adding an image in background also makes your WebSite look very nice.

body {
    /* background-color: green; */
    /* background-color: aqua; */
    background-image: url("http://i.stack.imgur.com/spmUM.gif");
}

CSS Assignment #3


Home Page

Next: CSS Day 4 »