Text and inputs on the same line

Asked

Viewed 4,692 times

-1

I need to put a text, an input-text, another text and another input text on the same line (Row) in html. I can’t find a way.

Can someone help me?

  • Do not understand your doubt? you want to put label and input on each other’s side?

  • I’d have an example of how you’re doing?

  • 2

    <table><tr><td>texto <input type="text"><input type="text"></td></tr></table>

2 answers

2

You can put a label in front of your input, getting like this:

<label>Nome: </label><input type="text" name="nome">
<label>Email: </label><input type="text" name="email">

If you want to put one input under another, you put a br to break the line.

2

with a simple CSS

#inline {
    display: inline;
}
<div id="inline">
   um texto <input type="text" placeholder="um input"/>
   outro texto <input type="text" placeholder="outro input"/>
</div>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.