JavaScript标签,性能和W3C [英] JavaScript tags, performance and W3C

查看:101
本文介绍了JavaScript标签,性能和W3C的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天我正在寻找网站优化内容,并且我找到了一篇关于将JavaScript脚本移动到HTML页面底部的文章。这对W3C的建议有效吗?
我了解到,所有的JavaScript都必须放在head标签内...
谢谢。

解决方案

文档


这个元素可能出现在HTML文档的HEAD或BODY中任何次数。



Today I was looking for website optimization content and I found an article talking about move JavaScript scripts to the bottom of the HTML page. Is this valid with W3C's recommendations? I learned that all JavaScript must be inside of head tag... Thank you.

解决方案

From the documentation:

This element may appear any number of times in the HEAD or BODY of an HTML document.

这篇关于JavaScript标签,性能和W3C的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆