answersLogoWhite

0


Best Answer

The BODY tag is the one you should reference if you want to set the background color of the entire webpage, using the bgcolor attribute. For example:

<body bgcolor="Blue">

This should be done using CSS. In an internal or external sheet, you want a rule similar to the following:

body {background-color: #ff00ff;}

If you insist on doing it inline (for whatever reason) you want to attach the STYLE attribute to the BODY tag directly, and use the same rule.

<body style="background-color:#f0f;">

User Avatar

Wiki User

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

Wiki User

9y ago

The <body> tag allows you to set the background colour, using the bgcolor attribute as follows:

<body bgcolor="red">

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What tag can set the background color for your page?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Can you set background color using font tag?

&lt;font style="background-color: red;"&gt;this text will have a red background&lt;/font&gt;


What is the default background color for the canvas element in HTML 5.0?

The default background color for the &lt;canvas&gt; element in HTML5 is the same as the browser default background color. If there is a style sheet or &lt;body&gt; tag that defines the color, &lt;canvas&gt; will inherited that color. You can add style attributes to the &lt;canvas&gt; tag to set a different default background color for the element.


What is an attribute and value to an HTML tag?

A tag can have an additional setting in it. This is an attribute. The attributes can then be given values. For example the body tag has an attribute to set the background colour of the page. The attribute is bgcolor. What colour you specify is the value, in this case it is red: &lt;body bgcolor="Red"&gt;


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"); }


What attibute you use in the body tag to give the background a solid color?

You use the style attribute to add any presentation to your BODY element, including background-color. This is the code to make an HTML document with a red background. &lt;body style="background-color: red"&gt; You can also add a stylesheet to the head of the document (or an external file, if you're going to have the same rules on more than 1 page.) &lt;style type="text/css"&gt; body { background-color: #f00; } /* Short of ff0000 which is hex for "red" */ &lt;/style&gt;

Related questions

Can you set background color using font tag?

&lt;font style="background-color: red;"&gt;this text will have a red background&lt;/font&gt;


What is the correct HTML for inserting a background color?

It is done with the bgcolor attribute. For example, to set a blue background for the whole web page, you would use it in the BODY tag, like this: &lt;body bgcolor="blue"&gt;


What is the default background color for the canvas element in HTML 5.0?

The default background color for the &lt;canvas&gt; element in HTML5 is the same as the browser default background color. If there is a style sheet or &lt;body&gt; tag that defines the color, &lt;canvas&gt; will inherited that color. You can add style attributes to the &lt;canvas&gt; tag to set a different default background color for the element.


What is an attribute and value to an HTML tag?

A tag can have an additional setting in it. This is an attribute. The attributes can then be given values. For example the body tag has an attribute to set the background colour of the page. The attribute is bgcolor. What colour you specify is the value, in this case it is red: &lt;body bgcolor="Red"&gt;


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"); }


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.


What tag you used for background color OLIVE?

body bgcolor="#E6E6FA"and close the entire tag in < and >.


What attibute you use in the body tag to give the background a solid color?

You use the style attribute to add any presentation to your BODY element, including background-color. This is the code to make an HTML document with a red background. &lt;body style="background-color: red"&gt; You can also add a stylesheet to the head of the document (or an external file, if you're going to have the same rules on more than 1 page.) &lt;style type="text/css"&gt; body { background-color: #f00; } /* Short of ff0000 which is hex for "red" */ &lt;/style&gt;


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 make a specific element have different styles than those set for its general element type?

You can counter the styles declared for the general element type. For example, if the earlier CSS declared "background-color: #FF0000;" for all "div" elements, but you want a specific "div" tag to have a different background color, you can add "background-color: #00FF00;" as a declaration to that specific "div" tag. A live example: ---- div { background-color: #FF0000; } This division will be green, not red! ----


HTML for adding a background color?

It's not HTML. Background color is a CSS style. You need to put in either a stylesheet, or attach the style attribute to the tag whose background color you're trying to set. For instance: &lt;p style="background-color:blue;"&gt;This paragraph would have a blue background.&lt;/p&gt; Colors in CSS can be set using names (there's 170 or so of them) Via a hexadecimal RGB value: &lt;p style="background-color:#b3b3b3;"&gt;This a meduim gray. The pairs of hex digits correspond to RGB.&lt;/p&gt; Using RGB directly: &lt;p style="background-color: rgb(179,179,179);"&gt;This is the same color as #b3b3b3&lt;/p&gt; And using RGBA (which gives you an alpha channel, letting you set transparency) &lt;p style="background-color: rgba( 179, 179, 179, .5 );"&gt;This paragraphs background color would be 50% transparent.&lt;/p&gt;


Which HTML tag would be apply the bgcolour attribute to change the background color of single table row?

The tr tag.