Add doctype method to Tag class.