Redes Sociales


31 ene 2012

Como crear un formulario en HTML

Os dejo un ejemplo de un formulario, podéis utilizarlo como modelo y cambiar las opciones a vuestro gusto.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">


<head>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"></meta>
  <title>InformáticaESP:: Formulario</title>
  /*<link rel="stylesheet" type="text/css" href="splaycss.css" /> Aquí haríamos referencia al archivo .css*/
  /*<script type="text/javascript" src="funciones.js" > </script> Aquí haríamos referencia a un archivo javascript */
 </head>

<body>
<div id="divcabecera">
  <h1> Formulario </h1>
  <p> InformáticaESP </p>
</div>



<div id="divform">
  /*<form method="post" onsubmit="return validarformulario(this)" action="http://www.urldedestino.com/" > Aquí es donde enviaríamos el formulario y haríamos la validación*/
<p> Nombre:
<input type="text" name="nombre" size="15" maxlength="30" />
<br />
    <br />
e-mail:
<input type="text" name="email" size="17" maxlength="35" />
    <br />
</p>

<fieldset>
<legend>Edad entre:</legend>
<input type="radio" name="edad" value="nen" checked="checked" /> de 4 a 10 <br />
<input type="radio" name="edad" value="adolescente"  /> de 11 a 18 <br />
<input type="radio" name="edad" value="mayor"  /> mayor de 18 <br />
</fieldset>
<p>
<br />
Intereses:
<br />
<input name="Internet" value="intereses" type="checkbox" /> Internet
<input name="Leer" value="intereses" type="checkbox" /> Leer
<input name="Cine" value="intereses" type="checkbox" /> Cine
<input name="Consolas" value="intereses" type="checkbox" /> Consolas
<br />
<br />
País:
<br />
<select name="Pais">
<option value=""></option>
<option value="España">España</option>
<option value="Marruecos">Marruecos</option>
<option value="Sud America">Sud America</option>
<option value="Inglaterra">Inglaterra</option>
</select>
<br />
<br />
Idioma:
<br />
<select multiple="idioma" size="2" name="Idiomas">
<option value="Español">Español</option>
<option value="Ingles">Ingles</option>
<option value="Aleman">Aleman</option>
<option value="Frances">Frances</option>
<option value="Catalan">Catalan</option>
</select>
<br />
<br />
Consulta o comentarios:
<br />
<textarea rows="10" cols="50"></textarea>
<br />
    <br />
<input type="submit" value="Enviar"/>
<input type="reset" />

 </p>
  </form>
</div>

</body>
</html>

0 comentarios:

Publicar un comentario

Related Posts Plugin for WordPress, Blogger...