Yes this is possible with an attribute string. You can use a dynamic label and set render xhtml to true https://docs.mendix.com/refguide/dynamic-label-document-template#2-2-render-xhtml
Hope this helps