
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Set the background image of an element with CSS
To set the background image of an element, use the background-image property.
Example
You can try to run the following code to learn how to work with the background-image property:
<html> <head> <style> body { background-image: url("/css/images/css.jpg"); } </style> <body> <h1>Hello World!</h1> </body> </head> <html>
- Related Questions & Answers
- Set the background color of an element with CSS
- Set the Background Image Position with CSS
- Set background image as fixed with CSS
- How to set the background image for an element with JavaScript DOM?
- Set the width of an image with CSS
- Set the height of an image with CSS
- Set the opacity of an image with CSS
- Repeat the background image with CSS
- Specify the background image with CSS
- Set a linear gradient as the background image with CSS
- Set a radial gradient as the background image with CSS
- Set all the background image properties in one section with CSS
- Set the Background Attachment with CSS
- Set the right margin of an element with CSS
- Set the top margin of an element with CSS
Advertisements