Instruction
1
The easiest way to make the background in the html document to specify the value of attributes to the body tag. The specified value of the background attribute to define a background image on the page. If you specify the value of the bgcolor attribute, the page will become the background color. The color in the bgcolor attribute of the body tag can be specified in hexadecimal variant, and just one word.
2
You can achieve the same effect using cascading style sheets CSS. The value of the background-color attribute determines the background color on the page, while setting the value of the attribute background-image to define the path to your Wallpaper page. These instructions can be assigned to the selector body. You can do another thing: in the html body tag to assign a class or ID, and css attributes the above to prescribe the class or ID respectively. You should only keep in mind that if the attributes are spelled out to the class, in the html document background color will have all objects with the specified class.
3
The above instructions can be written in the body of the html document. To do this in the service section between the head tags (opening and closing) to open the style tag. Between the opening and closing of this tag you can write any CSS instructions. You should only consider that in this case, the page weight will increase, which may have a negative impact on the time it is loaded the end user. Also note that if you specify a background image, it can be repeated horizontally, vertically, or on two axes at once. It is the attribute of the background-repeat in CSS. The background image can be firmly fixed, regardless of the presence of scroll bars in the document. To achieve this effect, you should specify background-attachment: fixed.
4
The background color of the html document can be done by resorting to programming languages. You can register the user html with JavaScript. For this approach the language design document.write. If the same Express through the DOM the statement document.body.style.backgroundColor = “red” will make the page background red. This is equivalent to prescribing the corresponding attribute directly in CSS.
5
The preceding statements could be written directly in the code of a web page, creating a couple of script tags between the opening and closing head tag. You can, however, all of these instructions to record in a separate file with js extension, which we then connect to the page.