avivar avivar - 1 year ago 44
Javascript Question

Is it possible to highlight part text of input button value?

I'm trying to bold part of the text inside an input button value.
HTML doesn't work inside the value attribute, so tags like

and also methods like
won't work.

Is it possible to bold just part of the text?


Using an input of type button and adding HTML to the value won't work, but you can just use a button element instead

<button><strong>Hello</strong> Kitty</button>