The Hypertext Markup Language
programmers use to create Web pages provides several ways to put words
next to photos. Two methods, using standard HTML tags, put the text next
to or underneath the picture in a location you determine. Another
method makes text appear next to the user’s mouse cursor when she points
the cursor at the picture. All of these methods are search-engine
friendly: the search engine catalogs the words along with the rest of
your page.
-
IMG and Title
-
To put pictures into your Web pages, you use HTML’s IMG tag. The tag specifies the photo’s file name, size and other information associated with the picture. The IMG tag has a Title option, in which you can type a description of the photo. If you use the Title option, the description appears whenever someone rolls their mouse cursor over the picture. You can make the comments as brief or as long as you like.
Javascript
-
The IMG tag also has Javascript event options such as onmouseover, onclick and onkeypress. Using these options and some Javascript programming, you can make comments appear when the user triggers one of these events. This method is similar to using the Title option, though Javascript gives you more flexibility as to how and where text appears.
DIV Tag
-
HTML’s DIV tag lets you create a text element and locate it anywhere on the Web page. By specifying precise horizontal and vertical location coordinates in the DIV tag’s Class option, you can locate the text above, below or to the side of a photo. Other Class options affect the font, style and size of the text. If you use the same photo and text locations in many pages, you can put the Class options in a separate Cascading Style Sheet file. By specifying a Class name in the DIV tag, you automatically locate the text and photo for all affected pages in the same manner.
Table
-
Before Web programmers used CSS to position graphic and text elements in Web pages, they used tables. In HTML, Tables are organized grids of rows and columns into which you can place photos and descriptive text. By tweaking row and column sizes, you precisely locate each element in the table. You can, for example, locate a photo in one table row and a description in the next row. This method can cause problems, however, as different Web browsers interpret table specifications differently and alter a page’s appearance in unpredictable ways. Also, tables can be complex and unwieldy; if you change a row or column by mistake, finding and fixing the mistake is difficult.
-