Home > Net >  <p> tag has padding around it
<p> tag has padding around it

Time:09-19

I have form with multiple inputs in it:

<input type="text" placeholder="First name" >
<input type="text" placeholder="Last Name"  name="last_name" size="1" value="{{ data.last_name }}">
<input type="text" placeholder="Username"  name="username" size="1" value="{{ data.username }}">
<input type="text" placeholder="Email"  name="email" size="1" value="{{ data.email }}">

but when I add <p>Please enter your email</p> under email it creates much more space than I would want

CodePudding user response:

that's margin not padding and you can change its value to achieve your desired space using CSS.

for example this is your p element:

<p >Please enter your email</p>

you can set your desired value for its margin like this:

.paragraph {
  margin: <top> <right> <bottom> <left>;
}

CodePudding user response:

Maybe u can try this

<p>Please enter your email:<input type="text" placeholder="Email"  name="email"></p>

  • Related