** Regular / 2 pages / ? words ** ** On Reader disk logo ** After last issue's leisurely introduction Neil Jones-Rodway looks at some tags to give your pages an edge over the competition... Backgrounds No doubt you'll have seen the snazzy backgrounds displayed by some pages. The
tag takes care of these - you may recognise it from last months skeleton document. Various attributes can be used to alter aspects of the basic page, a typical set is: ** BC on ** ** BC off ** The tag which sets background colour is the BGCOLOR attribute. This can be specified by name (for example BLACK, WHITE, YELLOW, RED, etc) or as three hexadecimal numbers representing Red, Green and Blue (RGB) values in the range 00 to FF (or 0 to 255 in decimal). In this format #000000 is black and #FFFFFF is white. The predefined colour names are listed in the README.TXT in the HTML_TUT folder on the Reader disk. More comprehensive details, including the RGB values for each colour, are included in the RGB_CODE.TXT file included in the HTML3KRZ archive on the AC#3 Reader disk. If you select a dark background colour you'll need to select a light text colour, this is set using the TEXT attribute. Similarly the highlighted colour for links is set using the LINK attribute. You may eventually get bored of flat colours, and want to add a smooth texture to the background, so the tag has provisions to specify an image to be used as a background instead. To do this, replace the BGCOLOR attribute with BACKGROUND="..." adding the path and filename of the background image between the quotes. Do check your background image looks good in mono, 16 and 256 colour resolutions as some images look terrible when dithered making some pages hard to read without turning the background off. In the examples accompanying this article I've selected a light texture (BACK.GIF) over which the story text is displayed: ** BC on ** ** BC off ** Anti Cubism Now we have a smart background let's add some images. All the image formats available for use in HTML are, by definition, rectangular which is fine if you're into cubism but not ideal for irregular shaped logos etc. Happily GIF images include a neat feature, called 'transparency', which overcomes this limitation. Any single colour in the GIF palette can be set 'transparent'. When the browser displays a transparent GIF on-screen all pixels in the specified colour are not displayed allowing the background to show through. Because this is handled directly by the image and the browser no HTML attributes or tags are required. ** TRANS.GIF here ** To create a transparent GIF you need some suitable software. ImageCopy (v4 or later) or the TRANSGIF.TTP included (included in the CAB distribution) both work fine. Taking the example lightbulb GIF image which is black against a white background we could either load it into Imagecopy and set the transparent colour via the 'Change Format' dialog or use TRANSGIF.TTP to determine which colour in the palette is white then the number this colour index number manually and output the result - both work fine but Imagecopy is easier. Moving About If you've laid out pages using a DTP package, you'll be aware of options to position images within text. Using HTML the...cell1... | ...cell2... |
...cell3... | ...cell4... |