Add HTML to <h:messages />
I guess the usual way you add messages ...
FacesContext context =
FacesContext.getCurrentInstance();
context.addMessage(null, new FacesMessage(your message goes here...
the messages should be added from server side... e.g String myMessage = "here is the text / HTML code..."
Take a look at this article by BalusC
Using HTML in JSF messages
Just use omnifaces o:messages. The problem will be solved.
e.g <o:messages escape="false"/>