Made it work with string and html elements