HTML input form

Asked

Viewed 59 times

-5

I have an HTML college job and can not do as the image below: alignment and date of birth and CEP masks...

follows my code:

<!DOCTYPE html>
<html>

<head>
  <title>Atividade06</title>
</head>

<body>

  <div id="area">
    <form id="formulario" autocomplete="off">
      <fieldset>
        <legend>Dados Pessoais</legend>
        <label>Nome:</label><input class="campo_nome" type="text">
        <label>Sobrenome:</label><input class="campo_email" type="password"><br><br>
        <label>Nascimento:</label><input type="date">
      </fieldset>
    </form>
  </div>
</body>

</html>


</body>

</html>

COMO TEM QUE FICAR O FORMULÁRIO

  • 1

    Edit the question by adding the CSS.

  • 1

    In the picture does not seem to me mask, the person who made the form of the image, instead of using a input[type='date'], like you did, she used 3 input[type='text'] ( 1 w/day, 1 w/month and 1 w/year )

1 answer

1


Have you ever heard of CSS? This will be necessary to style (align, determine the size of inputs, etc.) your page.

From the picture it looks like the date of birth is actually 3 <input> with placeholder attribute to appear dd mm yyyy. You can use type="number" for with max/min attributes so the user can only put valid values.

I recommend that in the next questions you also put the solutions you tried.

Browser other questions tagged

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