wp_kses() will do the sanitization of html output but keep the html. While using wp_kses you need to tell it what…