How to put html into Button

i’m currently using a button with the theme “Link” because i would like to create a link with a ClickListener attached to it, in order to open a sub window (like a login form in a modal window).
So this is my code

Button linkB = new Button("<li>Open form</li>");

But i can’t figure out how to put this button into [code]

  • [/code] markups. Is this the right way ?

    Thank you

  • You can’t put HTML in the button caption. You need to create a custom theme and style the button with CSS. Button has [tt]
    [/tt] style class by default, but you can give the specific button a style with [tt]

    See the
    chapter and
    section for more information.

    Also, if you need the Button to be within a LI, you’ll probably want to use CustomLayout.

    Best Regards,

    If you only need the bullet in front of the caption, you can achieve it with just CSS:

    .v-button-caption {
        display: list-item;

    Thank you all for your answers,
    i think it pretty much answered my initial question.