Creates a <span></span>
element.
<span></span>
elements are commonly used as containers for inline elements. For example, a <span></span>
can hold part of a sentence that's a different style.
The parameter html
is optional. It accepts a string that sets the inner HTML of the new <span></span>
.
Examples
Syntax
createSpan([html])
Parameters
html
inner HTML for the new <span></span>
element.
Notice any errors or typos? Please let us know. Please feel free to edit src/dom/dom.js and open a pull request!