WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML DOM Source Object

Source Object

The Source Object is new in HTML5.

The Source object speaks to a HTML <source> element.

Access a Source Object

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

var x = document.getElementById("mySource"); Try it

Create a Source Object

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

var x = document.createElement("SOURCE"); Try it

Source Object Properties

Property Description
media Sets or returns the estimation of the media property in a <source> element
src Sets or returns the estimation of the src property in a <source> element
type Sets or returns the estimation of the sort quality in a <source> element