his 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
The quickest way to set your background is to use the CSS
The
If you only want to set your background color, you can use
You can set a background image on any HTML element by using the
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 Code | Result |
|---|---|
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 Code | Result |
|---|---|
HTML background color example
|
Background Image
You can set a background image on any HTML element by using the
background-image property.| Source Code | Result |
|---|---|
HTML background image example
|
0 comments:
Post a Comment