Web Design at Georgetown CollegeBeta

Image Basics

Things to Learn

Setup and Editing

Background Images

Images in Content

Captions

If you’d like your image to have a caption, use a figure element:

<figure>  
    <img src="image.jpg" alt="Description of picture">  
    <figcaption>Caption for picture</figcaption>  
</figure>

You may wish to add a class to your figure element for easy styling:

<figure class="example">  
    <img src="image.jpg" alt="Description of picture">  
    <figcaption>Caption for picture</figcaption>  
</figure>
Description of picture
Caption for picture - source

You can then style your image and caption using .example, .example img, and .example figcaption in your stylesheet.