/

On this page

Caption position

The .captionposition docs ↗ function sets the global position of captions relative to the elements they describe.

This applies to:


The primary parameter, called default, sets the global style for all captioned elements. Additional parameters figures, tables, and code override the default position for those specific element types.

Each parameter is optional and accepts top or bottom values. Documents use .captionposition {bottom} by default.

Example 1

.captionposition {bottom}

![Sky](sky.jpg "A nice sky.")

| Name | Favorite food | Favorite beverage |
|------|---------------|-------------------|
| John | Chicken       | Orange juice      |
| Jane | Pasta         | Iced tea          |
| Joe  | Sushi         | Beer              |
"Survey results."
Default: bottom

Example 2

.captionposition {top}
Default: top

Example 3

.captionposition {bottom} tables:{bottom}
Default: bottom, tables: top

Photo credits: Pixabay