Background Code

This page contains HTML background code. That is, code that defines the way that your website's background is displayed in a web browser.

Here are some examples of applying background code to an HTML document.

The background Property

The quickest way to set your background is to use the CSS background property. This property sets all your background properties at once.

The background property is perfect if you are setting many properties. If you're only setting one or two properties however, you might prefer to use one of the more specific properties such as background-color or background-image. More on those below.

Source CodeResult
HTML background code example

Background Color

If you only want to set your background color, you can use background-color:{color code}, where {color code} is a color name, hex code, or decimal RGB value.

Source CodeResult
HTML background color example

Background Image

You can set a background image on any HTML element by using the background-image property.

Source CodeResult
HTML background image example

More Background Code

Here are more background codes:

About HTML.support

HTML.support was created in order to provide HTML tools, codes, tutorials, and other resources to help webmasters create and maintain their HTML documents.

HTML.support aims primarily at beginners, but may also be useful to web professionals.

About the HTML Codes

The HTML codes on this website are provided free of charge, for you to use however you wish. Feel free to modify the code to suit your own needs.

Need Hosting?

Our partner site HOSTEK provides website hosting, domain names and related products at some of the best prices on the web. If you need web hosting, check them out!