We are using background-repeat to do so.īackground-image: url("bg2.jpg"), url("bg3.png") Here we are trying to add couple of background images wherein the first image will appear only one time and the second image will be repeated.
#How to put background image in html how to#
Now let’s execute some of the examples to understand how to use CSS property values.
#How to put background image in html code#
In all the examples, we will be defining the CSS code inside the tag. Later moving ahead, we will look at different CSS properties using which we can change the look & feel of the webpage. Let us first understand how we can add background image in a webpage using CSS. Using CSS properties, we can also add background image in a webpage.
The background attribute which we specified in the tag is not supported in HTML5. The most common & simple way to add background image is using the background image attribute inside the tag. In this blog we will understand how we can add background images in a webpage using HTML & CSS. One of such ways is adding background image. There are various ways in which images can be added to a web page to make it look captivating & appealing. Moving on with this article on Background Image In HTML Background Image In HTML The following pointers will be covered in this article: Adding a Background Image in HTML is one of the most common tasks when you are working on Web Designing.