WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML DOM Caption Object


Caption Object

The Caption object speaks to a HTML <caption> element.

Access a Caption Object

You can get to a <caption> component by utilizing getElementById():

var x = document.getElementById("myCaption");

Create a Caption Object

You can make a <caption> component by utilizing the document.createElement() method:

var x = document.createElement("CAPTION");

Caption Object Properties

Property Description
align Not upheld in HTML5. Use style.textAlign or style.captionSide instead.
Sets or returns the arrangement of the caption

Standard Properties and Events

The Caption object additionally underpins the standard properties and events.