Quick Start Challenge Banner


How To Modify Image Caption Text In WordPress

Collaborating in image resizing

Often Two Heads Are Better Than One

In the comment section of a recently published post someone asked me how to modify image caption text. He wanted to reduce it. I must confess, I am not an HTML or CSS expert, so I resorted to my basic knowledge of HTML and suggested a solution based on that knowledge.

Not having tested it myself, I suggested that the text size of the image caption could be modified by adding <font size=”10″>Caption</font>.

A friend of mine, Sorina, saw the comment and she corrected me and brought to my attention the new changes in coding.

I did a Google search using the  query “how to reduce size of image caption in wordpress”. The search results returned the following answer:

 The size attribute of <font> is deprecated in HTML 4.01. Use CSS instead. CSS syntax: <p style=”font-size:20px”>  Source

I decided to try my original suggestion and see if it still works in WordPress and my updated Canvas theme. Of course, it did not work. Then I applied the <p style=”font-size:20px”> code and, naturally, it worked.

 

Before the test – default size of the caption

Standard Caption size

Best Friends

 

After the test – after adding <p style=”font-size:20px”> before text

Resizing-the-image-caption-using-HTML

Best Friends 

Wait there is more – the best is yet to come!

After I finished writing this post I added an image to the top left side of the post. The caption was created in the editor of the media library (as described above). The edited image was uploaded to the WordPress editor of this post that I was writing. After uploading the image I noticed that a mistake was made. I was just about to delete the image when I noticed that my cursor was in the caption section of my image, purely by coincidence.

Well, imagine that. You can change the size of the font of the image right in your editor. Not only that, you can bold it, you can even hyperlink it, you can do pretty well whatever you want with it.

So, was this experiment an exercise in futility. No, not for me. I’ve learned a great deal. And as a bonus, I can share my knowledge with my friends and my readers.

I hope you liked the results of this experiment. If you did please click on the LIKE button below or leave me a comment.

 

 

 

Don't Miss A Thing, Get Free Updates By Email

 
You Might Also Like:

,

11 Responses to How To Modify Image Caption Text In WordPress

  1. Paul Henderson November 22, 2012 at 3:30 am #

    Hey Dita, a cool find – thanks for sharing. Must try it !:)

  2. Dave E Wilkes November 22, 2012 at 3:36 am #

    Hi Dita, thank you for making this extra post – it sure is a big help.

    By applying the information you gave here I have managed to deal with the problem I was having with my captions.

    You are a star.

  3. Sorina Dascalu November 22, 2012 at 6:40 am #

    Hi Dita,

    I’m glad you found my comment helpful.

    On more thing I want to add for everybody who is using WordPress for a long time and now, reading this probably thinks “why didn’t I discovered that before?” – The answer is:

    The ability to use HTML/CSS to image captions is a rather new feature, it was only introduced in WordPress 3.4 (release in June 2012). Before that date all this wasn’t possible, WordPress was not able to interpret the HTML text in image captions.

  4. Paul Eveleigh November 22, 2012 at 7:36 am #

    Hi Dita,

    Thanks for the update, very useful. I must find some time to go and implement this on a couple of posts.

    Paul

  5. admin November 22, 2012 at 1:20 pm #

    Hey you guys,

    I am pleased you found the post helpful. That is very gratifying to me.

    Thanks Sorina for the additional information. Having WordPress and the WYSIWYG editors at our fingertips makes one forget to keep up to date.

    All of you have a great day.

    Dita

  6. Mark Salmon November 23, 2012 at 3:59 am #

    Hi Dita,

    This is a useful post. I hadn’t thought about captions much before reading this post and your other one about making captions interesting. In business, it’s all the little things that count and make it difficult for others to compete. A couple of days ago I learnt the importance of internal linking i.e. linking to other pages within your site (like Wikipaedia does). These are the kind of details that escape 95% of internet marketers.

    Mark

    • admin November 23, 2012 at 1:10 pm #

      So true Mark,

      many of the seemingly “little” things escape most of us. I love the quote that a great internet marketer Peter Garety often uses.

      It is by Harvey Mackay:

      “Little things mean a lot? Not true! Little things mean everything!”

      Have a great day

      Dita

  7. Julie November 23, 2012 at 3:26 pm #

    Hi Dita,

    I think it’s a good idea to put a little effort into bringing out your images, they are so catching to the eye and really add value to the story.

    Thanks for this info Dita, I must put some more thought into the images I put up.

    Julie

  8. Kristine November 29, 2012 at 2:29 am #

    Hello! I’m actually having a hard time modifying this and that, especially pictures and other characters in my blog, that’s why thank you so much for this post!

  9. Emilia November 29, 2012 at 3:39 am #

    I’m really bad at resizing, cropping, and modifying images for my blog. I think your post has it all, so thank you very much for publishing it.

  10. Kelly November 29, 2012 at 6:31 am #

    Formatting those images for your blogs is definitely not one of the more difficult tasks of the blogging business because of your post. Thank you!

Leave a Reply