Adding Colors and Backgrounds

The <body> tag lets you create a background for your auction description using a color or a photograph. Here's how to use it:

  • To specify a background color, use bgcolor and one of these methods:

  • A color name. Specify a background color by name like this: <body bgcolor="yellow"> or <body bgcolor="blue">. There are 140 colors you can specify by name. To see a chart of them, go to www.learningwebdesign.com/colornames.html.

  • A hexadecimal number. These six-digit combinations of numbers and letters specify colors precisely: #000000 is black, and #FFFFFF is white. In between, you get combinations like #9900FF (violet), #9999FF (periwinkle), #FFFF00 (yellow), #999999 (gray), and so on. (The advantage of hexadecimal colors is that they give you more precise control over the shade.) So, if you want a yellow background, for example, your <body> tag looks like this:<body bgcolor="#FFFF00">.

    Tip

    If you don't habitually speak hexadecimal (and who does?), you can find a handy chart of colors and the codes that go with them at http://auctioninsights.com/colors.html or at http://xample.net/htmlcolors.htm.

  • To use a picture as your background, type <body background="http://www.yourimagehost.com/picture.gif">, replacing yourimagehost with the name of the Web site that hosts your photos and picture.gif with the name of your picture (which could end with .gif or with .jpg). If your picture is smaller than the browser window, the picture repeats itself to fill the window, as shown ...

Get eBay: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.