Can I nest a element within tags from default wordpress?

The only solution I know is manipulating the DOM in Javascript: Select all figure containing an a, look for its figcaption and append it to the a.