Set Full Background Image in HTML DOM

  • Program 01:


    <!DOCTYPE html>
    <html lang="en">

    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <style>
            html {
                background-image: url("https://www.w3schools.com/w3css/img_lights.jpg");
                background-size: cover;
            }
        </style>
    </head>

    <body>
    </body>

    </html>

  • Output:

No comments:

Post a Comment