Add style to your image captions

Did you ever want to add formatting to your captions in either or both thumbnails and large image captions?
Take, for example, adding scientific names to photos of plants or animals like the Atlantic puffin – Fratercula arctica.

The way  I’ll do this with TTG galleries is to add the html tag <em> to the text I want to italicize. And the place you add this html tag is in the appropriate Metadata field in Lightroom’s Library module. In the above example, this would be in the Caption field.

captions

captioned-cellBut there is a potential problem with doing this. What if you use your catalog to create lists? (What, you didn’t know you could do this? Then check out John Beardworth’s List View plug-in)
You certainly don’t want the html to be included in those lists. The solution is to create virtual copies of any image you plan on putting in a gallery and adding the html to the caption of the virtual copy.
For bold text, use the <strong> tag. You can even combine <strong> and <em> tags, nesting them to create bold italics:
Atlantic puffin – <em><strong>Fratercula arctica</strong></em>.

The downside of doing this is that any html tag you add (<em> or <strong>) will be included in the alt text attribute. This may affect search engines and will definitely affect screen readers. Decide for yourself if this matters to you.

 

Don't add any styling or you'll get a mess
Don’t add any styling or you’ll get a mess

Caution: Do not add any css to the caption. You may be tempted to color the italicized text, but if you do you’ll create some problems.

Following the above example, if you wanted to color the italicize text you might be tempted to do this:
<em style=”color: green;”>Fratercula arctica</em>

The color would be applied to the text, but since the caption information is also added to the alt tag, you’ll be tossing in an extra style= and that will mess things up. So don’t do this.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About this site

This site is: a repository of time-savers and best practices from a user's perspective, picked up from several years of using TTG plugins.
This site is not: a support site.
Read more here.

Subscribe to new posts

Tip Jar

If this site has saved you some time, kept your hair attached, or otherwise prevented you from tossing the mouse through the monitor, feel free to donate.

Categories


Highly recommended. This is my go-to Lightroom book. Click on the book image. (affiliate link)

Affiliate link!

Current TTG versions

Backlight  4 & 5

See the Backlight Modules page on your site for latest Backlight and module versions and changelogs.

You’ll also find the latest version number and download link for the Lightroom Publisher plugin.
(BL 3 and later)

 

Backlight 1 Versions

Backlight 1.2.4
Pages module 1.2.4
Cart Add-on 4.1.7
Client Response Add-on 7.1.3
Theater Add-on 1.2.6
Galleria Add-on 1.0.0
WordPress Add-on 1.2.6
Publisher 3.2.3

Backlight 1 has seen its end of life. See this post.

CE4 Versions

note: CE4 is no longer being developed or sold. See this post.

TTG-BE: 2.0.5a
Autoindex: 7.0.8
Cart: 3.1.4a
CRG: 6.1.3a
Gallery: 6.1.10
Pages: 7.0.15
Publisher: 2.3.3
Stage: 6.1.6
Theme for WordPress: 3.1.2