Check out the HTML Element widget: https://marketplace.mendix.com/link/component/204843
Hello Erwin,
Im not familiar with the Format String widget, but according to the documentation there should be an option called ‘Render value as HTML’ under the Data Source tab.
Docs - Format String
If that doesnt work, perhaps you could try using the HTMLSnippet but modifying the HTML in a microflow to include your attribute. The Community Commons module has a stringToFile method, it might be possible to build the HTML as a string and then store it in an HTML-file that is used in the widget.
Ill emphasize that this is mere speculation on my end though.
Best of luck!