Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to newline in HTML Button?

Tags:

html

Hello guys how to newline or break inside a input button?. I have this code:

<input type="button" id="Button" value="RECOMMEND DISAPPROVE" disabled="disabled" style="width:125px; height: 35px;"/>

I tried <br/> but not working..

like image 457
Traf De Law Avatar asked Jun 27 '16 07:06

Traf De Law


People also ask

How do you Newline text in HTML?

To do a line break in HTML, use the <br> tag. Simply place the tag wherever you want to force a line break.

What does \n do in HTML?

The \n character matches newline characters.


1 Answers

You may want to use the <button> attribute as <input> doesn't support the newline tags. So you could do this for example:

<button type="button" id="Button" disabled="disabled" style="width:125px; height: 35px;">RECOMMEND<br />DISAPPROVE</button>

See fiddle: https://jsfiddle.net/nk35ux2p

You may want to remove the button width/height as the text doesn't fit well in the button

I hope this will help you.

like image 118
node_modules Avatar answered Sep 28 '22 08:09

node_modules