You can create an <span> object using the document.create_element method.
let span = document.create_element("span")
.unwrap()
.dyn_into::<web_sys::HtmlSpanElement>()
.unwrap();
You can access an <span> object using the document.get_element_by_id method.
let button = document.get_element_by_id("my-span")
.unwrap()
.dyn_into::<web_sys::HtmlSpanElement>()
.unwrap();
width - The width of the span.
width set_widthheight - The height of the span.
height set_height
features = [
'HtmlSpanElement',
]