Foros aprenderaprogramar.com
Aprender a programar => Aprender a programar desde cero => Mensaje iniciado por: Dan_SB en 21 de Mayo 2015, 03:44
-
Buenas noches!
Vengo aquí a resolver el ejercicio °25 del curso "html desde 0" con el siguiente enunciado:
Crea una página web que contenga un formulario que cumpla estas condiciones.
Como título antes del formulario debe figurar con etiquetas h1 el texto <<Inscripción al concurso Jara y Sedal>>. Debe contener:
a) Nombre
b) Apellidos
c) Dirección
d) Fotografía (aquí se debe dar opción a elegir un archivo de imagen que será la fotografía)
e) Un botón submit para enviar que muestre el texto <<¡¡¡Me apunto!!!>> y un botón reset para restablecer que muestre el texto <<Cancelar>>.
Ten en cuenta que para el envío de archivos tienes que establecer correctamente los atributos del formulario: method y enctype.
Aquí el código:
<!DOCTYPE HTML>
<html>
<head><meta charset="utf-8"><title>Concurso jara y sedal</title></head>
<body style="color: red; background-color: Lavender;">
<h1 style="color: red; text-align: center;">Inscripción al concurso Jara y Sedal</h1>
<form method="post" enctype="multipart/form-data">
Nombre <input name="nombre" id="nombre" type="text"/>
<br></br>
Apellido <input name="apellido" id="apellido" type="text"/>
<br></br>
Dirección <input name="direccion" id="direccion" type="text"/>
<br></br>
Fotografía <input name="fotografia" type="file"/>
<br></br>
<button type="submit">¡Me Apunto!</button> <button type="reset">Cancelar</button>
</form>
</body>
</html>
Así se ve! :
(http://i.imgur.com/b3tr1nt.png)
-
Añadiéndole el action que olvide...
<!DOCTYPE HTML>
<html>
<head><meta charset="utf-8"><title>Concurso jara y sedal</title></head>
<body style="color: red; background-color: Lavender;">
<h1 style="color: red; text-align: center;">Inscripción al concurso Jara y Sedal</h1>
<form method="post" enctype="multipart/form-data" action="http://aprenderaprogramar.com">
Nombre <input name="nombre" id="nombre" type="text"/>
<br></br>
Apellido <input name="apellido" id="apellido" type="text"/>
<br></br>
Dirección <input name="direccion" id="direccion" type="text"/>
<br></br>
Fotografía <input name="fotografia" type="file"/>
<br></br>
<button type="submit">¡Me Apunto!</button> <button type="reset">Cancelar</button>
</form>
</body>
</html>
Ahora si creo que ya no tiene errores..!
-
Hola Dan lo veo todo bien :D