Using Background Images

In this lesson, we will learn how to set background images in our web pages. Let's begin!

The <img> tag can add graphics to your web pages. Since that, you have seen many simple tricks to use images and even created small interactions using JavaScript. CSS also helps you add powerful visual elements and effects with images, going far beyond the features of the <img> tag.

In this section, you will get to know a number of CSS features based on graphics and images.

The samples can be found within the Exercise folder below, these are in the Sample1.html, Sample2.html, …, Sample14.html files.

The index.html file contains a list of links to access them.

Exercise: Demo-folder

Get hands-on with 1400+ tech skills courses.