Refactors code to make tag handling more pythonic

Replaces opening/closing tag attrs with single tag attr
Builds opening/closing tags with string formatting
Adds attr support for single line tags
Replaces explicit Element class calls with super()