generate convenience method for setting text content of html Elements