
- How to put background image in html notepad how to#
- How to put background image in html notepad code#
These values use specific keywords to determine the position of the image. Let’s look at each of them: Keyword Values The CSS background-position property takes three kinds of values: keywords, precise values and percentages. You can do this using the background-position property. However, you can control the position in which the background image is displayed. When you insert a background image, it is automatically positioned on the top-left corner of the element. For our, if we change its property to “background-repeat: repeat-y ”, it displays like this: For our, if we change its property to “background-repeat: repeat-x ”, it displays like this: Repeat-x: this repeats the image along the x-axis. It repeats the image until the entire background is covered. Here is a brief explanation of these values. no-repeat, repeat, repeat-x, and repeat-y. The background-repeat property takes one of four values i.e. With this, the above would look like this: To avoid the above image from repeating, we’d simply write: You can set the position to center center to center the image in the pageīy default, the background image is tiled so that it fills the entire area of the element.īackground-image: url(images/orchids.jpg) The background-position property is to set the position of the background image. The other values for background-repeat are ‘repeat’, ‘repeat-x’ and ‘repeat-y’. The default is to tile the background image. The background-image property points to the URL of the image.īackground-repeat is set to no-repeat so that the browser won’t tile the background image.
How to put background image in html notepad code#
This bit of CSS code sets the background image of the HTML Page. Here is a sample page where we are setting the background image of the entire pageīackground-image: url(sunset-sunrise-city-water-7629.jpg) Set the background image of the entire page background image covers only 30% of the containing element The background image is fit within the container element (parts of the background image may not be seen) The background image must cover the entire area The size of the background image Examples: The position of the background image Examples: The background is fixed and the content scrolls The background scrolls along with the content Whether the background should scroll along with the content Examples: Here is a quick reference to CSS Background properties: background-image In addition to the background-image URL, there are a number of properties that you can use to customise the display of the background image.

Knowing html and having an image editor are the basic requirements for web developement.The best way to add a background image is via CSS.
How to put background image in html notepad how to#
If I learn how to use a image editor like adobe photoshop or jasc paint shop pro, I will be able to create pictures like these too. I want to learn eveything I can about html To use an image as a background image, we put it in our body tag.

The good thing about background images is that they automatically Save your notepad as your HTML and Open your page in your browser to see I want to learn everything I can about html

This link specifies the image on our server by using the exact url of the Where the image is, so we use the src attribute to specify the image. The tag to add an image is the IMAGE tag. For our purposes, we will use some images on this Uploaded to your web site, you do not have to link the entire web address, It is wise to upload the image to your site. When you use an image, basically you are linking Page, what makes a page exciting is images. While working with text is important, and color adds some character to a HTML stands for HyperText Markup Language Part 4: Images and Backgrounds
