Ver Mensaje Individual
  #5 (permalink)  
Antiguo 25/05/2009, 15:15
kseso?
Colaborador
 
Fecha de Ingreso: junio-2007
Mensajes: 5.798
Antigüedad: 16 años, 10 meses
Puntos: 539
Respuesta: Problema con iframes y W3C

El error te lo marca porque estarás usando un doctype "Strict" como:
Código html:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Sin embargo, si cambias el doctype a "transitional":
Código html:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
el código que has puesto valida correctamente.

En el primer caso (con strict), el motivo de los tres errores te lo dice el propio http://validator.w3.org/check y están relacionados con el tipo de documento que declaras:
Cita:
Attribute "src" exists, but can not be used for this element.

<iframe src="/counter-strike/index.html" style="height:100px; width:100px"></ifr

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).
Cita:
Attribute "style" exists, but can not be used for this element.

<iframe src="/counter-strike/index.html" style="height:100px; width:100px"></iframe>

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

Y el tercero:
Cita:
element "iframe" undefined. Did you mean "iframe" or "frame"?

…x.html" style="height:100px; width:100px"></iframe>

You have used the element named above in your document, but the document type you are using does not define an element of that name. This error is often caused by:
* incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Frameset" document type to get the "<frameset>" element),


P.D.: Jomaruro, la etiqueta img también se debe cerrar:
Código html:
Ver original
  1. <img src="... />

Un saludo
__________________
Por una web con mucho estilo
+++ CUENTA ABANDONADA. ¿la quieres? +++