on air

HTML <body> Background Image.

back home » webtutorials » HTML » HTML <body> Background Image.


The <body> background attribute is used to place an image behind the <body> element in an HTML document. In the examples below, we've detailed the HTML <body> background attribute, bgproperties, and its values the easiest way for everyone to understand.

Hope your cerebrums catches up with this easily.

<body> Background Image Basic.

<body background="URL">


The "URL" is where you'll place the pointing address to the required image file you'll like to use.

Relative URL.

Relatively, you can point to an image file within a website like this: See illustration below.

<body background="/images/bgimage.jpg">


Absolute URL.

Absolutely, you can point to an image file on a different domain somewhere on the internet.

See illustration below.

<body background="https://www.anothersite.com/images/bgimage.jpg">


<body>Background "no-repeat" And "fixed" Inline CSS.

<body style="background-repeat:no-repeat">

<body style="background-attachment:fixed">

  1. At default, background image will repeat itself if smaller than the browser window, to fill the rest space. Adding an inline CSS, style="background-repeat:no-repeat" in the body tag line as indicated above, will supress it.

  2. The inline CSS style="background-attachment:fixed" as indicated in the example above if used, will glue the background image to sit still. It will cease it moving up and down when scrolling the page's content.

Deprecation Note.

Since the release of HTML 4.01 / XHTML 1.0, most HTML attributes are deprecated, and has lost their support in some DOCTYPEs DTD. Some deprecated attributes are still supported in all major browser. However, using CSS will enable you achieve the required effect, and full support in HTML 4.01 Strict / XHTML 1.0 Strict DTD and also in HTML5.

FastLane Tip#2

We seriously recommend using the CSS background-image properties. for best results, regardless which HTML version you'll intend to or writing.

HTML Background Image Properties


Man will give you worldly powers, and make you feel on top of all, note this is temporally and could be redrawn at anytime sending you back to the ground floor of life. However, the Lord Almighty, the one and the only rightful ruler of the Universe, blesses everlastingly.


Knowledge is Power, but Power is not Knowledge. Wisdom is the truthful Power that identifies the Knowledge within the man. And only, I repeat 3x. Only the almighty God has the power to bless the man with his Wisdom forever.

To achieve the Lord's blessings, cease not praying daily, asking for his Wisdom, and you'll be blessed abundantly...


Spyera Phone

Spyera Phone version is software that you install on a smart phone to monitor everything happening on the phone. After installation, SPYERA secretly records events (sms, call history, phone book, location, emails, What's App messages, IM, Facebook Chat, Skype, See photos taken and many more...) that happen on the phone and delivers these information to a web account, where you can view these reports 24/7 from any Internet enabled computer or mobile phone. SPYERA also allows you to listen to the surroundings of the target mobile , listen to the phone conversation and to know the location of the device.

Please, Kindly Donate What You Can, Enabling Us Pay Hosting And Domain Costing, And Do More.

Please Donate