answersLogoWhite

0

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

16y ago

What else can I help you with?

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


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

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.