How to make a background in html?

Kristina Firsova
Kristina Firsova
March 15, 2013
How to make a background in html?

To create a site, an important question is how to make the background in html. Such a procedure involves the use of certain tags - code words and letters. Thanks to them, you can put a different background, make it monotonous - fill it in, or put any picture in place of the background. Such actions will be very useful to all layout designers, and those who decided to independently “dress up” their site.

Making a background

Before making the background of the html site, you need to open the html page code in a text editor. It must be remembered that the tags on the page are placed vertically. Then between the tags<head></head>need to put a tag<style></style>- these tags are needed in order to clarify the style of the elements of this web page. In place of the three points you need to register -body {background:}. This is a parameter by which you can set different styles for the background of the page. You can do a color-setting operation in two ways. First:

body {background: # 000000}- now the background of the page should be black.

This method is also suitable for setting both the color and the picture as a background.It is after the colon, you can put either a color code or a link to the picture. And you can use a method that means only setting the color - a certain fill for the page. After the colon, you need to register the so-called parameter - color. And after him, put the code of the color itself. This method is good if you use it as a template. Register it and save, and when you need to set the color, put it on the page.

You can put, instead of a monophonic background, a picture. If you need to know: in html, how to make a picture background, then you need to do similar operations. Add tags, put body {background: link to image}. It must be remembered that the picture itself can be anywhere. And on the website on the Internet, but it is best to create a folder in the root of the document. In the folder inside which all information about the site page will be saved, you need to create another one - for pictures. The operation will look like this:

<style>body {background:cсылка на картинку} </style>

Now the picture you have selected will be the background of the entire page of the site. We hope that you understand how to make the background in html. Just try it and everything will work out!