sábado, 1 de abril de 2023

HTML - Código para crear formulario

 Crea tu propio formulario HTML,  dejo un breve código.






HTML
<form action="#" target="" method="get" name="formDatosPersonales">

        <label for="nombre">Nombre</label>
        <input type="text" name="nombre" id="nombre"
        placeholder="Escribe tu nombre"/>
   
        <label for="apellidos">Apellidos</label>
        <input type="text" name="apellidos" id="apellidos"
        placeholder="1r Apellido"/>
   
        <label for="email" />Email</label>
        <input type="email" name="email" id="email"
        placeholder="email" required />
   
        <label for="asunto">Asunto</label>
        <input type ="text" name="asunto" id="asunto"
        placeholder="titular de la consulta"/>
   
        <label for="mensaje">Mensaje</label>
        <textarea name="mensaje" for="mensaje"
        placeholder="describe brevemente en menos de 300 carácteres"
        maxlength="300"></textarea>
       
        <input type="submit" name="enviar" value="enviar datos"/>
    </form>

CSS
form{
    display: flex;
    flex-flow: column;
    line-height: 30px;
}
input:focus {
    background-color: rgb(78, 255, 187);
    transition: .4s all linear;
  }

No hay comentarios:

Publicar un comentario