Selfclose tags automatically and correctly

based on http://xahlee.info/js/html5_non-closing_tag.html