SóProvas


ID
4852159
Banca
CESPE / CEBRASPE
Órgão
Ministério da Economia
Ano
2020
Provas
Disciplina
Programação
Assuntos

Acerca de desenvolvimento de sistemas web, julgue os item a seguir. 


No HTML 5, as tags de link e script usadas para referenciar arquivos de CSS e JavaScript não precisam informar o atributo type, porque, na sua ausência, o navegador assume que o arquivo é do tipo text/css ou text/javascript. 

Alternativas
Comentários
  • Gabarito: CERTO

    Link

    The type attribute specifies the media type of the linked document/resource.

    The most common value of type is "text/css". If you omit the type attribute, the browser will look at the rel attribute to guess the correct type. So, if rel="stylesheet", the browser will assume the type is "text/css".

    Fonte: https://www.w3schools.com/tags/att_link_type.asp

    Script

    The type attribute Indicates the type of script represented.

    Omitted or a JavaScript MIME type: For HTML5-complient browsers this indicates the script is JavaScript. HTML5 spec urges authors to omit the attribute rather than provided a redundant MIME type. In earlier browsers, this identified the scripting language of the embedded or imported (via the src attribute) code. JavaScript MIME types are listed in the specification.

    Fonte: https://developer.mozilla.org/pt-BR/docs/Web/HTML/Element/script

  • Questão passível de recursos, para scripts, o navegador assume o mime type padrão de "application/javascript" e não "text/javascript" como o item afirma.

    https://developer.mozilla.org/pt-BR/docs/Web/HTML/Element/script