Skip to main content

How to Set a Background Image in HTML


If you want to add a background image instead of a plain color there are some considerations you should make before doing so:
  • Is the background image discrete enough to not take away the focus from what's written on it?


  • Will the background image work with the text colors and link colors I set up for the page?


  • Will the background image work with the other images I want to put on the page?


  • How long will the page take to load my background
    image? Is it simply too big?


  • Will the background image work when it is copied to fill the entire page? In all screen resolutions?

After answering these questions, if you still want to add the background image you will need to specify in the <body> tag which image should be used for the background.

<body background="drkrainbow.gif"> 


Note:
If the image you're using is smaller than the screen, the image will be replicated until it fills the entire screen.


If, say you wanted a striped background for your page, you wouldn't have to make a huge image for it. Basically you could just make an image that is two pixels high and one pixel wide. When inserted on the page the two dots will be copied to fill the page - thus making what looks like a full screen striped image.




When you choose to use a background image for the page it is always a good idea to specify a background color as well.

<body background="drkrainbow.gif" bgcolor="#333333"


The reason is that until the background image is loaded, the background color will be shown.

If there is too much difference between the background color and the background image, it will look disturbing once the browser shifts from the background color to the image.

Therefore it is a good idea to specify a background color that matches the colors of the image as close as possible.




You may have noticed that background images scroll with the page when you use the scroll bar.The background image will scroll when the user scrolls down the page, unless you have set it to be fixed:

<body background="drkrainbow.gif" bgproperties="fixed"



By adding the bgproperties="fixed" you force the browser to let the background be fixed even if the user is scrolling down the page. 

Note: Fixed backgrounds are only supported by MSIE and do not work in Netscape browsers - instead they simply act as normal backgrounds.





As mentioned earlier in this section a limited use of colors can add more power to the few colors that are used.

The most important tool for adding colors to certain areas of the page rather than the entire background is tables.



                www.bitdefenderhelp.com

                www.printersupport.world

Comments

Popular posts from this blog

Essential Blog Writing Tips for WordPress Beginners

Essential Blog Writing Tips for WordPress Beginners Good blog writing skills contribute a lot to promote a website. In order to build a large audience base and tremendous popularity with lots of new visitors each day, you need to pay more attention to content creation to catch readers’ attention. Without quality content, whatever you have done in your blog will be in vain. Thus, improving the skill is a top task for beginners. However, they may be confused about how to write, what to write and how to make their blog eye-catching. Considering this, we have comprehensively concluded following important blog writing tips for our readers. Be Enthusiastic about Reading Before being a good writer, you need to be a good reader at first. In fact, many successful writers have a good habit on reading. When reading some articles selected from other authors, you need to learn how they can write such fascinating posts. Besides, the best way to get the skills from others is taking notes...

How to get more Facebook Followers/Likes

Facebook is the number 2 most visited website in the world. This produces massive opportunities for you to be able to reach potentially millions of people. The Facebook ‘page’, if used correctly, can be an invaluable tool to connect with current and potential customers. The 2012 State of Inbound Marketing report found that the number of businesses that say Facebook is critical or important to their business has increased by 75%. If you feel that you are not getting the most out of your Facebook page, read on. Here are some easy steps you can take to try and gain more followers… Use The Facebook Like Button Plugin If you have a website or blog, this is the perfect way to get more followers. Simply go to the Facebook Developers website, go through the steps and paste the code into your website or even your blog posts. This is probably one of the best ways to get followers, especially if people are viewing your website and finding it useful. Variety is the Spice of Life P...

How to Create an Awesome and attractive Facebook Fan Page

Among social media networks, Facebook is the undisputed king. A whopping 3.2 billion likes and comments are posted on the social media site daily, according to data  collected  by Media Bistro. Facebook now has 1.15 billion users  per month with about 699 million people logging on daily. Here’s how to leverage these users with a Facebook page that will build fans and customers. How to Create a Facebook Fan Page Creating your Facebook fan page is the first step in Facebook marketing. Create a Facebook Fan Page as a way to keep in touch with your customers. Use the channel to build your brand and to gain the ability to respond quickly to customers’ comments, feedback and questions. Here’s a feature overview (courtesy:  Facebook Pages ). When completed, your Facebook fan page should look like this: Your Facebook fan page should be a dynamic and interactive digital hub for your brand. Here’s how to get started. Step 1: Choose a Category and a P...