Abstract html insertion into a private helper.