X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR BOOTSTRAP XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML DOM Span Object


Span Object

The Span object represents an HTML <span> element.

Access a Span Object

You can access a <span> element by using getElementById():

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

Create a Span Object

You can create a <span> element by using the document.createElement() method:

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

Standard Properties and Events

The Span object supports the standard properties and events.


Related Pages

HTML tutorial: HTML Blocks

HTML reference: HTML <span> tag



Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook