Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To include a background image from a local folder in HTML, you can follow these steps:

  1. First, create a folder in your project directory where you can store your image.

  2. Put your image file (for example, image.jpg) in the folder.

  3. In your HTML file, add the following code to the <style> tag:

    body {
       background-image: url('folder/image.jpg');
    }
    

    Here, replace "folder" with the name of the folder where the image is stored, and "image.jpg" with the filename of your image.

  4. Save your HTML file and open it in a web browser.

You should now see your background image displayed on your web page.