answersLogoWhite

0

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

13y ago

What else can I help you with?

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.


What is the css code for posting a picture?

To post a picture using CSS, you typically use the background-image property. Here’s an example: css .image-container { width: 300px; /* set width */ height: 200px; /* set height */ background-image: url('your-image.jpg'); /* specify image URL */ background-size: cover; /* ensure the image covers the container */ background-position: center; /* center the image */ background-repeat: no-repeat; /* avoid repetition */ } In HTML: html Copy code This CSS code sets a background image for a container and ensures it's centered, scaled, and non-repeating.


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:

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.


What is the css code for posting a picture?

To post a picture using CSS, you typically use the background-image property. Here’s an example: css .image-container { width: 300px; /* set width */ height: 200px; /* set height */ background-image: url('your-image.jpg'); /* specify image URL */ background-size: cover; /* ensure the image covers the container */ background-position: center; /* center the image */ background-repeat: no-repeat; /* avoid repetition */ } In HTML: html Copy code This CSS code sets a background image for a container and ensures it's centered, scaled, and non-repeating.


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


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


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