Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

380
Vistas
Error: A script element with a defer attribute must not have a type attribute with the value module

I have this code in the <head>-section:

<script defer src="./static/js/main.js" type="module"></script>

The validator on validator.w3.org gives me the error: "A script element with a defer attribute must not have a type attribute with the value module."

The javascript works fine and I am trying to understand the reason for the error. What can I do to solve the error?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I found the answer on https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script.

The defer attribute has no effect on module scripts — they defer by default.

The error message is a little bit confusing. It suggests there is something wrong with the type-attribute. It would be a little bit more clear if it would say something like: "A script element with a type attribute with the the value module should not have a defer attribute."

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda