You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

  Thursday, 06 May 2021
  1 Replies
  5.6K Visits
Any advice about using <figure> vs the JCE caption button? I've been using your caption functionality, but might I be better off using <figure>?
more than a month ago
JCE Captions were created before the <figure> tag existed, or was part of the standard HTML specification, so it was a way to create inline, styled captions.

The <figure> and <figcaption> tags are the "official" way to markup and caption images, with some caveats:

  1. The <figure> tag is usually styled and displayed as a block element, which means it is on its own line, ie: you can't have something next to it like text, unless you are using Columns or some other sectioning markup.
  2. By default the <figure> tag is styled with margins all around it, so you usually have to override this with a margin:0 style
  3. The <figure> and <figcaption> tags are usually unstyled - without borders, colours etc. - so you will need to add any special styling yourself.

The following css seems to work well for generic <figure> and <figcaption> tags, which you can add to for additional styling:

figure {
display: table;
margin: 0;

figcaption {
display: block;
caption-side: bottom;

Just because you're not paranoid doesn't mean everybody isn't out to get you.

  • Page :
  • 1
There are no replies made for this post yet.
Be one of the first to reply to this post!