Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/03/2008, 12:35
Carol_84
 
Fecha de Ingreso: septiembre-2007
Mensajes: 234
Antigüedad: 16 años, 7 meses
Puntos: 1
Exclamación ¿html 4.1 ó Xhtml?

Hola. Estoy validando mi pg web. En principio empecé a validarla como xhtml Strict,es decir que la cabecera de mi fucniónn era de la form:

<!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="en" lang="en-AU">
<head>



y todo me fué perfecto, sin ningún fallo.
Pero no ahora me surge la duda de si validarlo con HTML ó XHTML.
Alguien puede aclararme la diferencia??
Es que ahora al validarlo con HTML 4.1, y poner la sigunete cabecera

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>

pues me da error en las consultas SQL que tengo en mitad del código, como por ejemplo:

<option value="" selected="selected" >Elige una de las opciones........</option>
<?php
include "conn.inc.php";
$sql="SELECT id,perfil FROM datos WHERE id<>'1'";
$resultado= mysql_query($sql) or die("ERROR EN LA CONSULTA".mysql_error());
while($row=mysql_fetch_array($resultado))
echo "<option value=$row['id']>".$row['perfil']."</option>";
?>
</select>




Line 70, Column 60: character data is not allowed here.
$sql="SELECT id,perfil FROM privilegios WHERE id<>'1'";✉
You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include:

putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>), or
forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes), or
using XHTML-style self-closing tags (such as <meta ... />) in HTML 4.01 or earlier. To fix, remove the extra slash ('/') character. For more information about the reasons for this, see Empty elements in SGML, HTML, XML, and XHTML.


Alguien puede decirme como debo de validarlo si con HTML ó con XHTML??
Gracias

Última edición por Carol_84; 11/03/2008 a las 12:48