HTML5 与 Javascript 有什么区别
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7650426/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What's The Difference HTML5 vs Javascript
提问by Howdy_McGee
I got asked a question that I really didn't know how to answer. "What's the difference between HTML5 and Javascript?" I mean we know HTML is a simple markup language but to get into the things that HTML5 does, such as the <canvas>
tag for instance; don't you really NEED JavaScript to produce those canvas animations? Would you even be able to make an image slider without any JavaScript assistance? When it comes down to it wouldn't I be able to just use a JavaScript plugin vs HTML5 99% of the time?
我被问到一个我真的不知道如何回答的问题。“HTML5 和 Javascript 有什么区别?” 我的意思是我们知道 HTML 是一种简单的标记语言,但要深入了解 HTML5 所做的事情,例如<canvas>
标签;你真的不需要 JavaScript 来制作那些画布动画吗?您甚至可以在没有任何 JavaScript 帮助的情况下制作图像滑块吗?归根结底,我不能在 99% 的情况下只使用 JavaScript 插件和 HTML5 吗?
采纳答案by mikerobi
Technically it HTML5 is a standard for the next generation of HTML. In reality it has become an all encompassing buzzword for javascript and every web technology developed since HTML4.
从技术上讲,HTML5 是下一代 HTML 的标准。实际上,它已成为 javascript 和自 HTML4 以来开发的所有网络技术的一个包罗万象的流行语。
These are frequently refereed to as HTML5 technologies.
这些经常被称为 HTML5 技术。
- Javascript
- HTML Canvas
- WebGL
- CSS3
- Other CSS improvements such as flex boxes
- Offline Storage
- Geolocation
- New events such as touch and orientation
- Ajax
- Websockets
- Javascript
- HTML 画布
- WebGL
- CSS3
- 其他 CSS 改进,例如 flex 框
- 离线存储
- 地理位置
- 新事件,例如触摸和方向
- 阿贾克斯
- 网络套接字
回答by Rob
You cannot create web pages without HTML. Nowadays, javascript is the script of the web and, to do most things dynamically, you need to use it despite the many things CSS3 can even do.
您不能在没有 HTML 的情况下创建网页。如今,javascript 是网络脚本,为了动态地做大多数事情,你需要使用它,尽管 CSS3 甚至可以做很多事情。