Update the closing tag to reflect the element type