Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/07/2011, 10:54
JUMASOL
 
Fecha de Ingreso: noviembre-2005
Mensajes: 889
Antigüedad: 18 años, 5 meses
Puntos: 8
Validación XHMTL de fragmento con JavaScript

Hola,

En una página que estoy intentando validar aparecer este código justo al final del header:

<script type="text/javascript">
document.write('<style>.noscript { display: none; }</style>');
</script>

Intento validarlo y me sale este fallo:


Line 30, Column 25: required attribute "type" not specified

document.write('<style>.noscript { display: none; }</style>');

The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.

Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.

He probado varias modificaciones para ese trozo de estilo pero no consigo entender dónde está el fallo.

¿Me podéis orientar?

Gracias.