Bueno, que funcione o no en un navegador determinado no quiere decir que esté Bien o Mal la acción... sólo quería diferenciar ese punto.
Por ejemplo, mientras que esto
valida:
Código PHP:
<!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" xml:lang="es" lang="es">
<head>
<meta http-equiv="Content-type" content="text/html;charset=iso-8859-1" />
<title>Página nueva</title>
</head>
<body>
<div id="a"></div>
</body>
</html>
Si cambiamos el id por id="1", no validará:
Cita:
Iniciado por error 1. Error Line 11, Column 9: value of attribute "id" invalid: "1" cannot start a name.
<div id="1"></div>
It is possible that you violated the naming convention for this attribute. For example, id and name attributes must begin with a letter, not a digit.
No siempre podemos guiarnos por lo que
funcione, sobre todo en IE.
Saludos