what code do i use to add an image as a background on my html page?

exactly which tags do i use and where do i put them? thanks so much

Public Comments

  1. you need to go get a photobucket or tiny pic account
  2. this is the code.. hopefull it shows up.. <img src="http://img.jpg">
  3. In the <body> tag is where they go. Just as you use 'bgcolor' for the background color, you use Background="image.jpg" for a background image. Also set the text color in there. <body background="Backs/bgbluefabric.gif" text="white"> and that's it! The rest of the body stuff goes down here. </body>
  4. To add as a background you'll need: <body background="image.jpg"> where "image.jpg" is a link to your picture. You do need quotes around the file name/path. Your page will already have a <body> tag if it's already built, and there may be other things in the tag. You can add the background="image.jpg" anywhere between <body and >.
  5. You can use CSS: body { background-image:url(image.jpg); } the "image.jpg" is the path to the image you want in the BG. If the image isn't actually in your site, you can use a url background-image:url(http://www.site.com/images/image.jpg);
  6. if you want image as background of your page then code will be <body background=ImageFileName> if you just want to add an image somewhere in your page then <img src=ImageFileName width=100 height=100>
Powered by Yahoo! Answers