getCueAsHTML

The getCueAsHTML() method of the VTTCue interface returns a DocumentFragment containing the cue content.

MDN Reference