THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML DOM Span Object


Span Object

The Span object speaks to a HTML <span> element.

Access a Span Object

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

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

Create a Span Object

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

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

Standard Properties and Events


Related Pages

HTML tutorial: HTML Blocks

HTML reference: HTML <span> tag