Sorry, you've lost me. That caption is just one word. How is that relevant to your question about changing styles within a single string?
But there's no reason it couldn't have been
caption: 'The dog says <span style="color: red; font-weight: bold;">woof!</span>',
Just as an example.