New Web page authors can take several approaches to give a page a multicolour background. One common way involves cascading style sheets (CSS) to display the background image. CSS uses "tags" similar to those of hypertext markup language (HTML). These tags let the author manipulate all aspects of a Web page, including its colours for paragraphs, headings and backgrounds. The advantage of entering CSS tags manually is the author can tailor a page to her exact needs.
- Skill level:
Other People Are Reading
Things you need
- A multicolour image file in JPEG, GIF, or other common format.
Click the Windows "Start" button. Enter "Explorer," then click the "Desktop" icon in Explorer's left pane.
Right-click in Explorer's right pane and click "New," then "Folder." Enter "mypage" for the folder's name, then press "Enter" to navigate to the new folder.
Right-click and select "New," then "Text document." Enter "mypage.htm" for the document's name. This action creates a blank text document ready to accept HTML code.
Right-click the document and click "Open with," followed by "Notepad."
Paste the following code into the document, which creates a Web page with some text on a plain, uncolored background:
<h1>This appears on a multicolour background</h1>
Paste the following code between the "<head>" and </head> tags. The code will tell your browser (once it loads the Web page), to display your image file. Replace the text that reads '<YOUR IMAGE'S FILE NAME>' with your image's file name. It must include the single quotation marks.
background-image:url('<YOUR IMAGE'S FILE NAME>');
Copy, using Windows Explorer, the graphic file to be used as the background into the "mypage" desktop folder you made in step 4.
Double-click, in Windows Explorer, the "mypage.htm" document. When the page loads it should have the colour background.
Tips and warnings
- As a backup, make a note of the full path of the file you plan to use for the background art (e.g. "c:\users\JohnSmith\Pictures\MyColorfulBackground.gif").
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for