fix too many ends
add convenience method for making empty element
basic IO for HTMLElement