elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Usando Git para manipular el directorio de trabajo, el índice y commits (segunda parte)


+  Foro de elhacker.net
|-+  Programación
| |-+  Desarrollo Web (Moderador: #!drvy)
| | |-+  No consigo validar W3C xhtml estricto
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: No consigo validar W3C xhtml estricto  (Leído 4,056 veces)
SuXoR

Desconectado Desconectado

Mensajes: 177


Ver Perfil
No consigo validar W3C xhtml estricto
« en: 25 Noviembre 2010, 12:21 pm »


El error que me da el validador es el siguiente:



Line 9, Column 87: document type does not allow element "link" here

… rel="stylesheet" type="text/css" href="style.css" />



The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).



Mi ingles no es del todo malo pero no consigo saber que es lo que no esta bien ahi.

Se trata de un link a una hoja de estilos, luego creo que debe ir en el head, sospecho que se trata de un error de principiante pero no consigo "verlo".

Aqui posteo el codigo hasta el body a ver si alguno ve algo raro:

<!--declaración XML-->
<?xml version="1.0" encoding="UTF-8"?>
<!--declaración DTD-->
<!DOCTYPE html
   PUBLIC "-//W3C//DTD XHTML 1.0 Strict//ES"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--declaración nombre de espacio--> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
<!--cabezera-->
 <head>
  <title>
titulo
<!--link al css-->
   <link rel="stylesheet" type="text/css" href="syle.css" />
  </title>
 </head>
 <!--body-->
 <body>


« Última modificación: 25 Noviembre 2010, 13:47 pm por SuXoR » En línea

seele

Desconectado Desconectado

Mensajes: 137


Ver Perfil
Re: No consigo validar W3C xhtml estricto
« Respuesta #1 en: 25 Noviembre 2010, 14:09 pm »

hola
ests poniendo el link al css dentro de la etiqueta <title></title>
tiene que estar fuera del title pero dentro del head

saludos


En línea

SuXoR

Desconectado Desconectado

Mensajes: 177


Ver Perfil
Re: No consigo validar W3C xhtml estricto
« Respuesta #2 en: 26 Noviembre 2010, 01:21 am »

Muchisimas gracias, justo era ese el problema.
En línea

seele

Desconectado Desconectado

Mensajes: 137


Ver Perfil
Re: No consigo validar W3C xhtml estricto
« Respuesta #3 en: 26 Noviembre 2010, 01:40 am »

de nada! para eso estamos :)
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
IN() estricto...
Bases de Datos
Maox 1 3,148 Último mensaje 13 Diciembre 2009, 22:16 pm
por ^Tifa^
Introducción a XHTML
Desarrollo Web
peib0l 0 1,831 Último mensaje 8 Agosto 2010, 13:45 pm
por peib0l
javascript o xhtml
Desarrollo Web
miguelmax 7 2,903 Último mensaje 7 Octubre 2010, 20:54 pm
por miguelmax
Que es aliasing y aliasing estricto?
Programación C/C++
geeke 3 1,800 Último mensaje 15 Enero 2015, 13:34 pm
por MeCraniDOS
Cloudflare firewall muy estricto
Sugerencias y dudas sobre el Foro
MinusFour 6 4,045 Último mensaje 18 Mayo 2016, 22:55 pm
por el-brujo
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines