Label with HTML-Content in Version 14.1.17

I just cant find how i can set the Content of the Label from plain text to HTML content…

In previous version there has been a parameter like “ContentMode.HTML”… but in Version 14.1.17 cant find anything.

Could someone help me please?

Link to the Discription of “com.vaadin.flow.component.html.Label” in version 14.1.17:


Label has a different semantic meaning in V14. It refers to a <label> HTML element, which should only be used in connection to a labelled element like an image or an input. When you’re replacing a Vaadin 8 Label component, you could use e.g. a Span instead. To set HTML content to a Span, you can use span.getElement().setProperty("innerHTML", "<b>hello</b>"); . Another option is a Html component (Html requires a single root element).