answersLogoWhite

0


Best Answer

I would use a CSS style page. Place the following line in the header of the page to link to the style sheet.

<link rel="stylesheet" type="text/css" href="mystyle.css" />

The style sheet takes the place of the "style" modifier within HTML tags. In order to accomplish the background image you would need to put the following in the file "mystyle.css"

body{

background-image:URL('IMAGE FILE');

}

The body tag tells the compiler which tag to modify. In this case it is your entire page, or body. This could be replaced with any of the standard tags in HTML. If you wanted to specify a specific id you would write:

tag#id

for example, a <div id='foo'></div> would be represented in the css sheet by div#foo

Then, all of the style modifications within the curly braces are applied. This can do anything from text positioning, to sizing, to inserting backgrounds, etc.

This information originally came from w3schools.com

User Avatar

Wiki User

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

Wiki User

13y ago

First, it is deprecated in favor of putting it within the stylesheet. Within the Body tag you use the background="mypicture.gif" attribute. It can tile (if it small enough and you want it to) or be as one image (if sufficiently large). Define the image size only for tiling or for effect in a properly formatted page (not for this answer) and go from there.

It must be of necessary size to appear well, but that will slow the load of the image.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

Short answer: you can't.

You use CSS to add a background to an HTML element. HTML is a language that is primarily concerned with the structure of data. CSS, on the other hand, deals with how that data will be presented to a user.

To add a background in CSS, you create a CSS declaration within a CSS stylesheet. The declaration will first reference the element to which it is applied (using either an ID, class, or element level selector) and will then describe the specifics of an image being used as a background. The simplest way to add a background image to the entire page is illustrated as CSS code below.

body { background-image: url('bg.png'); }

This answer is:
User Avatar

User Avatar

Wiki User

9y ago

You include a link to the image in your <body> tag. Here is an example: <body background="bgimage.jpg">. Obviously, you would change the bgimage.jpg to point to the image you want.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Something along the lines of<body background="bgimage.jpg">

This answer is:
User Avatar

User Avatar

Wiki User

9y ago

Earlier there was a tag known as body background to change. Now it is embedded within the style tag.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

scanf

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How would you use an image as your background for HTML?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the correct CSS for adding a background image to a page?

Use the attribute BGCOLOR=".." inside the start Body tag using the color you want as the value. It should look like this: this will give you a black background, and at the end of your HTML document you close the Body Of cause if you use a black background you cannot use black font. You won't be able to see it. You can set the value=".." of the background to what ever you like.


How can you insert an image as a background if it is stored anywhere in the system?

You can display an image with HTML as long as you know the location of the image. You use the image tag like this: &lt;img src="...\anywhere\image.jpg" width="100" height="100" alt="My Image" /&gt;.


What is the HTML tag for a background?

There is no HTML tag for a background as such. You put in backgrounds by using the attributes of certain tags, depending what you want to put a background on and how you want to display the background. You can also use styles to do it. You can have a colour or an image as a background. The bgcolor attribute is used in a lot of different tags to put background colours on things. So if you wanted the background colour of your page to be red, then you would have the Body tag with the bgcolor attribute like this:If you wanted an image as the background to your page, you'd have:Using styles you can do more complicated things with backgrounds. For example, you can use a style to put a background on a paragraph in different ways:This paragraph will have your image as a background repeating horizontally.Your paragraph text goes hereThis paragraph will have your image as a background displaying only once.Your paragraph text goes hereThose are just 2 ways, but there are lots more, and they can be applied not just to paragraphs but to other structures like the body or a table or whatever you want.


How do you insert picture from desktop to HTML page?

You don't actually insert an image into an HTML page. An HTML page can display an image from any location where the browser has access to the file. Let us assume that the image you want to display on your HTML page is image.jpg. You use the tag to tell the browser to display your image. The person looking at your HTML page needs to be able to access the file on your desktop. You normally would upload your image to the Web server, so the visiting browser can see your image. If the image is on your desktop and the browser has access to your desktop content, here is the code you would use to display your image on the Web page:


If you use CSS to configure both the background image and the background color what will happen?

In most browsers the background image will be shown. If the image has been configured so as not to repeat, and the element is larger than the background image then the area that is not covered by the background image will display the background color. DJL

Related questions

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


What is the correct CSS for adding a background image to a page?

Use the attribute BGCOLOR=".." inside the start Body tag using the color you want as the value. It should look like this: this will give you a black background, and at the end of your HTML document you close the Body Of cause if you use a black background you cannot use black font. You won't be able to see it. You can set the value=".." of the background to what ever you like.


How do you adjust the size of the background of your HTML design?

You use CSS (Cascading Stylesheets) to add backgrounds to block level elements inside an HTML design. If you want a design for the entire page, the CSS markup will use the "body" selector. The background-image rule is then applied. When you're finished, it might look something like this: body { background-image: url('images/bg.png'); background-repeat: repeat-x; } CSS isn't part of HTML, but a separate language contained in either an external file, or in code added along with the HTML in your HTML document.


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 convert an image into an HTML page?

you don't actually make an image into a page you need to save it as a .jpeg or .gif image and then use it in an HTML document such as a Word document saved as an HTML page, or using a web design program like Dreamweaver for instance using the jpeg as a background or a gif as a web site button


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 can you insert an image as a background if it is stored anywhere in the system?

You can display an image with HTML as long as you know the location of the image. You use the image tag like this: &lt;img src="...\anywhere\image.jpg" width="100" height="100" alt="My Image" /&gt;.


What is the HTML tag for a background?

There is no HTML tag for a background as such. You put in backgrounds by using the attributes of certain tags, depending what you want to put a background on and how you want to display the background. You can also use styles to do it. You can have a colour or an image as a background. The bgcolor attribute is used in a lot of different tags to put background colours on things. So if you wanted the background colour of your page to be red, then you would have the Body tag with the bgcolor attribute like this:If you wanted an image as the background to your page, you'd have:Using styles you can do more complicated things with backgrounds. For example, you can use a style to put a background on a paragraph in different ways:This paragraph will have your image as a background repeating horizontally.Your paragraph text goes hereThis paragraph will have your image as a background displaying only once.Your paragraph text goes hereThose are just 2 ways, but there are lots more, and they can be applied not just to paragraphs but to other structures like the body or a table or whatever you want.


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 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.


How do I upload an image I have and use the HTML code but the image doesn't show What did I do wrong?

You should check your folder hierarchy and verify that all the HTML/xHTML code is correct. You can use an image editor to ensure the HTML code is correct.


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.