answersLogoWhite

0


Best Answer

There are a couple of ways to accomplish this: Inline CSS: <span style="background-color: #FF0000;">Blah</span> Or via a CSS Style: <style type="text/css"> .styleName {

background-color: #FF0000;

}

</style>

<span class="styleName">Blah</span>

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

In HTML 4, XHTML 1.0, or HTML 5 use CSS to add the image

body { background: url("images/image_name.gif") 50% 50% no-repeat; }

or

body { background-image: url("images/image_name.gif"); background-position: 50% 50%; background-repeat: no-repeat; }

In HTML versions prior to 4, use the BODY tag's background attribute.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

You can put a background on a number of HTML elements through CSS. You have the choice of either putting a color or an image, even an animated .gif file.

Mainly for the entire page you would write this:

body{

background-color:#000000;

}

or

body{

background-image: url(/yourImageFolder/bgImage.jpg);

}

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

In the HEAD section of the document, put in style tags. Then create a rule using the tag "Body"

<style type="text/css">

body {}

</style>

The rule for adding a background image is "background-image." It normally takes a URL as a parameter, although you can use data: and include the binary directly. It not a good idea unless you absolutely have to, so here I'll use URL.

<style type="text/css">

body { background-image: ulr(/images/ourImage.png); }

</style>

That will add the image to the background. By default, the image will repeat horizontally and vertically, starting from the top left corner of the page.

If for some reason you don't want the image to repeat across the entire page, use the background-repeat property. The possible values are repeat-x (which mean the background will repeat horizontally across the element), repeat-y (the background will repeat vertically for the entire height of the element), no-repeat (the background will not repeat), repeat (which is default) and inherit (meaning, whatever value the element had for this property.

You may also want to look into background-position. This property let's you set where the background is going to start.

This answer is:
User Avatar

User Avatar

Wiki User

10y ago

There are many places were one can obtain information on how to use CSS to create a background for there website including but not limited to many online sites such as web designing sites, through friends or family, an informative book and anybody who knows any general information on the topic.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

Insert this handy snippet into some CSS source code.

body

{

background-image: url('image.jpg');

}

This answer is:
User Avatar

User Avatar

Wiki User

15y ago

The HTML Body tag has an attribute called bgcolor. you can set it to change the background color of your page

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

In your CSS file or in your style tags, writing this:

body

{background-color: (your hex code here, eg. #FFFFFF);}

Gives you a background color.

This answer is:
User Avatar

User Avatar

Wiki User

9y ago

Yes. in your body tag, put in style="background-color:[background color];".

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do I configure a background image for a webpage using CSS?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How do you give a link for a background image using CSS?

You will need to use the url() function. For example: background-image: url('/images/bg.png');


How do we Design a webpage using javascript and HTML to do change the background image on the click of a button?

put his in the style section:.back {background-image: URL(background URL 1) ;}.back1 {background-image: URL(background URL 2 ) ;}.back2 {background-image: URL(backgroud URL 3) ;}Put this code to where you want to put the buttons: (don't change anything except for the button name)Special:WysiwygSpecial:WysiwygSpecial:Wysiwyg


Is using an image background more nice than using a background color?

The color contrast and effectors depends on other sections of it. There is no/hard way to answer this question definitely.


What CSS would apply a blue color to a web page background?

You have two options. 1. Set the body tag to the specified blue color: &lt;body style='background-color: #0000FF'&gt; (Find the colors and their corresponding codes using a search engine. #0000FF is a bright blue) 2. Create an image 1 pixel by 1 pixel of the blue color you want to use. Set the body tag to display that image: &lt;body style='background-image: url("myBlueImage.gif")'&gt; I have used the inline styles. You could do this using a linked sheet, or the &lt;STYLE&gt; tag in the header or your HTML. 1. BODY { background-color: #0000FF; background-image: url("myBlueImage.gif"); }


Can you open a videoaudio file using the anchor tag in HTML?

Yes. Doing this will cause the file to open in a separate window; it will not create background music or embed the video in the webpage itself.

Related questions

Put a picture in the background of a webpage using HTML?

Change the &lt;body&gt; tag to &lt;body style="background-image: image.jpg"&gt;. Replace image.jpg with your image.


How do to create a static webpage with only one image as background?

Use html only and that should give you a static page. You can put image as background by using css


How do you set an image as 100 percent of the background of a webpage using css?

There can be no design questions with trying A List Apart! See link below.


How do you make backgrounds that were originally from a picture using HTML?

Use the attribute Background=".." inside the start Body tag using the URL of the image as the value. It should look like this: &lt;body background="http//image URL./nameofimage.gif"&gt; this will place the image as the background of your webpage, and at the end of your HTML document you close the Body &lt;/body&gt; If the size of the photo is smaller than the size of the page the image will be repeated to fill in the space.


How do you put a color background on websites?

You can only change a website if it belongs to you. for instance i have a website of my own. i created it using webeden. when i log in, i can edit anything i want, including the color background. you try!


You are using windows Vista how do you use the same desktop for the adminstrator and a stand account?

If it is just one extra account it is probably easiest to configure them individually by going to: Desktop Background in Windows explorer then selecting the image then "OK" or by right clicking the image and clicking "Set as Desktop Background".


How do you put a background on your webpage?

To add a colored background, use the attribute BGCOLOR=".." inside the start Body tag using the color you want as the value. It should look like this: this example will give you a black background, and at the end of your HTML document you close the Body You can set the value="..." of the background to what ever you like. To add a picture background use the attribute Background=".." inside the start Body tag using the URL of the image as the value. It should look like this: this will place the image as the background of your web page, and at the end of your HTML document you close the Body tag If the size of the photo is smaller than the size of the page the image will be repeated to fill in the space.


How do you give a link for a background image using CSS?

You will need to use the url() function. For example: background-image: url('/images/bg.png');


How do you make a background on a webpage using HTML?

Making a background on a webpage in HTML is deprecated; you are advised to use CSS instead. However, if you must use HTML and only HTML, then place the "background" attribute in the body tag of the document in question like so: &lt;body background="http://www.example.com/picture.jpg"&gt;


How do you set a horizontally and vertically repeating background image to an HTML page using inline CSS?

Use the "style" attribute in the "body" tag to set inline styles. Set the "background-image" and "background-repeat"CSS attributes to the body element. "background-image" should have a path to the image you want as a background, and "background-repeat" should have "repeat," indicating you want the image to tile both horizontally and vertically. For example (replace path-to-image.jpg with a relative or absolute path to the background image of your choice): ---- ... ----


How do we Design a webpage using javascript and HTML to do change the background image on the click of a button?

put his in the style section:.back {background-image: URL(background URL 1) ;}.back1 {background-image: URL(background URL 2 ) ;}.back2 {background-image: URL(backgroud URL 3) ;}Put this code to where you want to put the buttons: (don't change anything except for the button name)Special:WysiwygSpecial:WysiwygSpecial:Wysiwyg


How to use CSS in making the picture a background?

To make a picture a background of a web site using CSS, you will use the different background properties, which are: background-color, background-image, background-repeat, background-attachment, and background-position. The specific property you are looking for is background-image. To use this property you would declare in your style sheet the following: body { background-image: url('paper.jpg'); } This is telling the web browser to use the image paper.jpg and make it the background of the entire page. The other background properties control whether the backgound is repeated along the x and/or y axis, the position on the screen the image begins at, whether the background is fixed or scrolls with the page, and the background color.