treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Button With Line Breaks

Last updated on:

You can use carriage return characters to break the line: 


<input type="button" value="Really&#x00A;Tall&#x00A; Button">

View Comments

Comments

  1. In last Opera (11.51) doesn’t work.

  2. Permalink to comment#

    Doesen’t work on ipad either.

  3. Doesn’t work in Dolphin Mini Browser on Android

  4. johndoe
    Permalink to comment#

    <button>line1<br/>line2<br/>line3</button>

    better solution.

  5. i think johndoe’s solutions is better..

    • Permalink to comment#

      It works fine when you need a <button>, but when you want an honest to goodness button input, it’s a poor semantic replacement.

  6. The code should also work fine :

    between opening and closing tags -

    (input type=”submit” value=”Really
    Tall
    Button” / )

    Write “Tall” and “Button” from the next line. Space is also counted in ” ” .

  7. Permalink to comment#

    Tested and failed.

  8. I preferred CSS Techniques “white-space: normal;” and it works fine.

  9. Pawan
    Permalink to comment#

    Nice Code. :)

Leave a Comment

Use markdown or basic HTML and be nice.