# HTML Coding

**URL:** <https://boards.straightdope.com/t/html-coding/349425>\
**Category:** Factual Questions\
**Created:** [March 22, 2006, 1:42pm UTC](https://boards.straightdope.com/t/html-coding/349425 "2006-03-22T13:42:45Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![illuminati](https://avatars.discourse-cdn.com/v4/letter/i/e47774/32.png) [@illuminati](https://boards.straightdope.com/u/illuminati)\
**Post date:** [March 22, 2006, 1:42pm UTC](https://boards.straightdope.com/t/html-coding/349425/1 "2006-03-22T13:42:45Z")

</div>

Hi everyone.

Is there a way, using HTML code i can have an image as a background with the other stuff (links, pics, words etc) happening on top?

Thanks

---

<div class="post-metadata">

**Author:** ![Snickers](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@Snickers](https://boards.straightdope.com/u/Snickers)\
**Post date:** [March 22, 2006, 1:58pm UTC](https://boards.straightdope.com/t/html-coding/349425/2 "2006-03-22T13:58:43Z")

</div>

Absolutely. Use the BACKGROUND attribute in your BODY tag, and point it at the image you want to use. Like so:

\<BODY BACKGROUND="/graphics/image.jpg"\>

And you should be all set.

---

<div class="post-metadata">

**Author:** ![cooky173](https://avatars.discourse-cdn.com/v4/letter/c/71c47a/32.png) [@cooky173](https://boards.straightdope.com/u/cooky173)\
**Post date:** [March 22, 2006, 2:03pm UTC](https://boards.straightdope.com/t/html-coding/349425/3 "2006-03-22T14:03:55Z")

</div>

if you mean like having a picture of a dog instead of just a plain colour, then just having the normal webpage, 've done it before, so i know u can…microsoft front page should let you do it…if that doesn’t work, i learnt to code off [This site](http://www.neopets.com), its been a while since i’ve had to do it, so i can’t remember it exactly…if you still are having trouble tomorrow i’ll see if i can’t find it for you…its bedtime now though

something to keep in mind is that if you set a pic as a background it will be tiled or very stretched.

---

<div class="post-metadata">

**Author:** ![cooky173](https://avatars.discourse-cdn.com/v4/letter/c/71c47a/32.png) [@cooky173](https://boards.straightdope.com/u/cooky173)\
**Post date:** [March 22, 2006, 2:05pm UTC](https://boards.straightdope.com/t/html-coding/349425/4 "2006-03-22T14:05:08Z")

</div>

ok, either quick reply doesn’t allow you to use html…or my memory of html is a lot worse than i thought

---

<div class="post-metadata">

**Author:** ![Rico](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/rico/32/3582_2.png) [@Rico](https://boards.straightdope.com/u/Rico)\
**Post date:** [March 22, 2006, 3:23pm UTC](https://boards.straightdope.com/t/html-coding/349425/5 "2006-03-22T15:23:14Z")

</div>

> [@cooky173](#):
>
> ok, either quick reply doesn’t allow you to use html…or my memory of html is a lot worse than i thought

**cooky173** , welcome to the SDMB. You may use bb code in your posts, but not HTML.

I’ll fix your coding. You can see how bb code is formed by clicking “Reply” on your message, or you may use the guided mode available on the standard replay form to automagically form the bb code for you.

Or simply type the URL in and leave the “Automatically parse links in text” box checked and the board will automatically turn it into a link.

Again, welcome and feel free to explore.

Rico  
For the SDMB

---

<div class="post-metadata">

**Author:** ![Ponder\_Stibbons](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ponder_stibbons/32/343_2.png) [@Ponder\_Stibbons](https://boards.straightdope.com/u/Ponder_Stibbons)\
**Post date:** [March 22, 2006, 3:43pm UTC](https://boards.straightdope.com/t/html-coding/349425/6 "2006-03-22T15:43:50Z")

</div>

I thought I’d point out that my standard reference site that I use when I’m not sure on one of the finer points of html is this: [http://www.htmlhelp.com/](http://www.htmlhelp.com/)

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [March 22, 2006, 4:12pm UTC](https://boards.straightdope.com/t/html-coding/349425/7 "2006-03-22T16:12:55Z")

</div>

> [@Snickers](#):
>
> Absolutely. Use the BACKGROUND attribute in your BODY tag, and point it at the image you want to use. Like so:
> 
> \<BODY BACKGROUND="/graphics/image.jpg"\>
> 
> And you should be all set.

Is this part of the HTML standard, or is it someone’s extension?

---

<div class="post-metadata">

**Author:** ![Colophon](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@Colophon](https://boards.straightdope.com/u/Colophon)\
**Post date:** [March 22, 2006, 4:27pm UTC](https://boards.straightdope.com/t/html-coding/349425/8 "2006-03-22T16:27:27Z")

</div>

> [@ultrafilter](#):
>
> Is this part of the HTML standard, or is it someone’s extension?

It’s standard - or at least it was when I learnt HTML in about 1995, but according to [this page](http://www.w3.org/TR/html401/struct/global.html#edef-BODY), it is “deprecated”, i.e. it “has been outdated by newer constructs”.

But I can’t see from that page what “newer constructs” should replace it.

---

<div class="post-metadata">

**Author:** ![Snickers](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@Snickers](https://boards.straightdope.com/u/Snickers)\
**Post date:** [March 22, 2006, 4:30pm UTC](https://boards.straightdope.com/t/html-coding/349425/9 "2006-03-22T16:30:00Z")

</div>

I’m guessing those “newer constructs” would be the use of CSS (style sheets) instead of the attributes within tags.

Although it’s depreciated (like a ton of other attributes, FONT and STRONG among them), I’m betting most browsers will continue to display images via the BACKGROUND attribute for some time.

---

<div class="post-metadata">

**Author:** ![mhendo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/mhendo/32/3159_2.png) [@mhendo](https://boards.straightdope.com/u/mhendo)\
**Post date:** [March 22, 2006, 4:53pm UTC](https://boards.straightdope.com/t/html-coding/349425/10 "2006-03-22T16:53:44Z")

</div>

> [@Colophon](#):
>
> It’s standard - or at least it was when I learnt HTML in about 1995, but according to [this page](http://www.w3.org/TR/html401/struct/global.html#edef-BODY), it is “deprecated”, i.e. it “has been outdated by newer constructs”.
> 
> But I can’t see from that page what “newer constructs” should replace it.

Yeah, like **Snickers** says, it’s probably the use of CSS.

So, instead of putting the tag:

\<BODY BACKGROUND="/graphics/image.jpg"\>

into your webpage, you just put in the tag:

\<BODY\>

and have a Cascading Style Sheet (either in the header of the webpage, or preferably as a separate file) that says something like:

```auto

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

```

---

<div class="post-metadata">

**Author:** ![illuminati](https://avatars.discourse-cdn.com/v4/letter/i/e47774/32.png) [@illuminati](https://boards.straightdope.com/u/illuminati)\
**Post date:** [March 23, 2006, 12:51pm UTC](https://boards.straightdope.com/t/html-coding/349425/11 "2006-03-23T12:51:09Z")

</div>

wow thanks for you help!

My next question is how, using HTML can i have a number of small images that open up in a new window slightly larger.

I have seen it done and it would look great on my dads site im “helping” to create.

thanks for your input, i did a little html a couple of years ago and cant remember much. Just enough to get me in trouble.
