Mi estimado :Colaborador: (
edit... me refiero a Myakire

), sírvase usted de validar este xHTML en
http://validator.w3.org/ :
Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<label for="nombre">Nombre</label>
<input type="text" name="nombre" id="nombre" />
<br />
<label for="apellido">Apellido</label>
<input type="text" name="apellido" id="apellido" />
<p>Seleccione fruta preferida:</p>
<label>Manzana</label>
<input type="checkbox" name="fruta" value="manzana" id="fruta" />
<label>Naranja</label>
<input type="checkbox" name="fruta" value="naranja" id="fruta" />
<br />
<input type="submit" name="Submit" value="Submit" id="Submit" />
</form>
</body>
</html>
Cita: This page is not Valid XHTML 1.0 Transitional!
Below are the results of checking this document for XML well-formedness and validity.
1.
Error Line 19 column 58:
ID "fruta" already defined.
Código:
<input type="checkbox" name="fruta" value="naranja" id="fruta" />
An "id" is a unique identifier. Each time this attribute is used in a document it must have a different value. If you are using this attribute as a hook for style sheets it may be more appropriate to use classes (which group elements) than id (which are used to identify exactly one element).
2.
Info Line 17 column 58: ID "fruta" first defined here.
Código:
<input type="checkbox" name="fruta" value="manzana" id="fruta" />
Edit: Cita:
Iniciado por u_goldman El uso del atributo ID también es importante por cuestiones de usabilidad.
Completamente de acuerdo