how to add background in html

<!DOCTYPE HTML>
<html lang=us>
  <meta charset=UTF-8>
  //the following code within the style tags is CSS.
<style>
  /*this is a body tag. After specifying 
  that we want to affect the whole body,
  we add {}, and write the background color
  we want to change it to. */
  body{background:rgb(255,0,0);
  }
  /* this is a class, which we have named green. we add {}, then
  write the background color we want.*/
  .green{background:green}
   /* this is an id, which we have named blue. we add {}, then
  write the background color we want.*/
  #blue{background:blue}
</style>

<body>
This background is red.
  // you must make sure to note that when you add a background to
  a paragraph, you must add a class or id, name it, then style it 
  as seen above.  with tags HTML already recognizes, however, you 
  don't have to do anything more than shown above.
  <p class="green">
  This background is green.</p>
  <p id="blue">This background is blue.</p>

</body>

</style>
</html>


4
9
LE SANG 145 points

                                    &lt;!-- Background image --&gt;
&lt;div class=&quot;bg-image&quot; style=&quot;
      background-image: url('https://mdbootstrap.com/img/new/standard/city/041.jpg');
      height: 100vh;
    &quot;&gt;&lt;/div&gt;
&lt;!-- Background image --&gt;

4 (6 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
make background html How to insert a background image in HTML? use an image as background html add image as a background in html how to add background to image in html use a background image html html image background html how to add background image how to make background an image in html set backgrounf image in html how to add a background with html how to add a website background in html add a background in html how to set background html how to make background image in html adding a background to body html add background in html page set background into html adding a background html add backgrounf in html add background image to an html page add background to body html how to add body background image in html how to add backgroud in html add background in html how to set a background image html set background html how to create background image in html how to add background picture in html add background image html background add a background html how to add a background on your website w3schools how to insert background pictures in html how to put a background in a html add background to html how to set a background in html how to put a background image in html add background to the html how to set background on html how to set a background html how to add a background html set background in html add background html adding background in html how to add background html using background in html how to add background in word html add background photo how to create backgrounf in html how to add cool backrounds to htm implement background picture in html css backgroud img background-image inside html how to add background css html code for background google html background how to set downloaded image as a background in html html show image as body background how to make background in html how to put background in html how to add background on html how to set image as background in html using css how to put a background in html how to get an image as a background in html how to add complete image in background how to make a background in html html change background image how to link background image on body in html background image body css attribute how to make a background on html website html background image how to add image from online as background in html putting a background on html add a photo background in html html add a background pic how to have a background html bg in html how to change background image in html how to set a background html image make an image the background html body background html add background with html how to put an image as the background for body how to get an image as background html add background image in ht add background image to di\ Add a backround as an image file html tag website background in html set a background to an image html in style html background image how to change the background of an image in html what is the html tag for background image backgrounds images using html how to insert a background image in html how to set a background image in html background for html body how to use picture background in html place a background image html html css background image how to put the whole picture on the background of html background image program in html html background background in html change background image html how to set the background image in html on body css html image background background tag in html how to put image in background of html how to edit background image in html how to creat a back ground in html background tag html background html image' make image background html set background image html sample html background image background image html background image html how to add an image in background in html How to select background image for body in html how to write background image in html put image as background html insert background in html html background-image setting background image in html background image in website tag which is the correct way to apply a background image in html how to add a bg inmage below bg video background-image background element adding image to body in html background image in html how to insert backlground images into html with CSS background-image w3 how to use background image in html and css adding image background to html how to set an image as background in html html insert image as background image as background html how to make image background how to make a background image in html html background images add background picture in html how to make an image your background in html how to add an image as back ground html html background image how to place an image onto a background color html applying background image in html html tag to set background image how to put background image in html how to use image as background in html how to add an image as background in html inserting a image in html backgound add a background to html 5 how to set the background image in html how to add parageraph space in css html add background image to body how to make img html tag as background html how to set background image how set an image as a background in html inserting background image in html How to put wallapepr as pic in html how to have a picture background in html how to insert background image in html how to add image background html how to background image in html add background image in html how to add a background in html how to add an image as a background in html set image as background html html how to give background image how to use background image in html how to use image in background in html how to make a picture background html how to make your background an image in html how to add a background image html making an image background html insert image as background in html background image in htmln body set background image in html how to add add background image in html how to put bg image in html adding background image in html add a background image in html add image background html add background image html how to add image in background in html html style background image code to set background image in html how to add background image in html from file how to add background image html how to make a background for your website html how to insert image as background in html how to set image as background html how to give background image in html how to set a website background image in html how to set image as background in html set image as bg html html add background image how to set a pic as background in html hot to find backgrond image in html file insert background image in html html set background image how to set a bg image in html giving background image in html how to insert an image as a background in html img as background html how to make abckground in html how to set background in html adding a background image in html how to create a background image in html how to make a picture as a background in html set image as a background in html how to add background image in html code to add a background image in html how to get a bagground in html How to make a backround image in html how to add a background image using html how to make the background of html an image add image as html background adding a background in html how to add a background image in html how to set background image in html how to add background in html
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source