Jump to content
Meinolf Müller

caption within image definition

Recommended Posts

Hello,

as I'm new in this business I would like to know the reason for the caption tag within <img ...> tag. I'm using the TinyMCE editor for inserting images into my site. But sometimes (not ever) the editor places the caption="false" tag to others like width=... and hight=.... Everything is working and when I take away that tag it is working too. So, what is the reason for that and what else can I do with caption?

Thank you for your help.

Share this post


Link to post
Share on other sites

Caption is not a valid attribute for the <img> element, so it wouldn't do anything. The editor should not be adding a caption attribute.

Share this post


Link to post
Share on other sites

it is more than likely it adds this using JS when caption checkbox is selected, it becomes a reference for surrounding img in figure, and insert figcaption element, as its added by js, this caption attribute is not violating any rules.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×