How to Put a Caption Under a Picture in a Web Page

How to Put a Caption Under a Picture in a Web Page

When you design a Web page, it's important to convey as much information as possible in a compact space. Putting keywords in a caption also helps with search engine optimization. Besides, having captions underneath an image is an organized way to provide additional details on a topic. If you already understand how to use tables and

elements with Hyper Text Markup Language, creating effective image captions takes no time at all.

Instructions

HTML Tables

    1

    Create a

    element anywhere on your Web page where you want the image and caption to appear. The table should have two rows -- or elements -- between the opening and closing tags. Add two table cells, or . Specify the source of your image with the attribute "src=" and the dimensions with "height=" and "width=," if different from the actual image. Unlike other elements,
    does not use a closing tag, but include the "/" before the closing tag mark for it to work right.

    elements, one between each row's opening and closing tags.

    The HTML table should look like this:

    2

    Enter your
    element into the top row, between the first

    and


    3

    Enter your text caption in the bottom row between the second and . You can further format the text within the cell, changing its font size or its cell alignment, with an embedded element.

    Your image, complete with caption, should now look like this:


    Image caption here.

HTML Table Captions