Html HTML5 是一种编程语言吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14512218/
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
Is HTML5 a programming language?
提问by Erick Ribeiro
Nowadays, we can use HTML5 to make apps, as in android, in firefox os, iPhone, Blackberry and others. But, I heard that HTML is a Markup language, not for programming. Even with App features, HTML continues to being onlya markup language?
如今,我们可以使用 HTML5 来制作应用程序,例如在 android、firefox os、iPhone、Blackberry 等中。但是,我听说 HTML 是一种标记语言,而不是用于编程。即使有了 App 功能,HTML 仍然只是一种标记语言吗?
采纳答案by Erick Ribeiro
Short Answer:No.
简短的回答:没有。
Long Answer: No, it isn't. HTML as defined by the standard is just a markup language, exactly as it was in its previous versions.
长答案:不,不是。标准定义的 HTML 只是一种标记语言,与之前的版本完全一样。
But what does that mean?It means that it is supposed to structureyour data allowing you also to define semantics with the use of markers, but it cannot process or modify your data as you would do using a programming language. Also it has no concept of inputor outputas is the case in programming languages??, where you get an input to analyze and produce an output.
但是,这是什么意思?这意味着它应该构造您的数据,允许您还使用标记来定义语义,但它不能像使用编程语言那样处理或修改您的数据。它也没有输入或输出的概念,就像在编程语言中一样??,您可以在其中获得输入以分析并产生输出。
By the way HTML5 is coming out alongside a wider interest for the web and also stronger technologies (such as newer versions of javascript and css) which make new web applications even more powerful and limitless.
顺便说一下,HTML5 的出现伴随着对 Web 的更广泛兴趣以及更强大的技术(例如更新版本的 javascript 和 css),这使得新的 Web 应用程序更加强大和无限。
Please, read this great resourceto learn more about HTML5.
请阅读这个很棒的资源以了解有关 HTML5 的更多信息。
回答by T.J. Crowder
Programming languages have certain features, like branching, looping, that sort of thing, that HTML5 lacks. HTML5 defines markup for some interactive features, but the markup is almost entirely static (there's someinteraction implied in the definition of select
elements and such). A lot of "HTML5" features you hear about aren't HTML5 at all, but rather things you can do with JavaScript (a programming language) in a modestly-capable browser.
编程语言具有某些特性,例如分支、循环等 HTML5 缺乏的特性。HTML5 定义了一些交互功能的标记,但标记几乎完全是静态的(元素等的定义中隐含了一些交互select
)。您听说的许多“HTML5”功能根本不是 HTML5,而是您可以在功能适中的浏览器中使用 JavaScript(一种编程语言)实现的功能。
HTML5 is increasingly taking over (or hastaken over) the role of defining both the structure of web pages andthe API to interacting with them from a programming language. That used to be quite separate, in the DOM specs, but a lot of that is now being folded into the HTML5 specification. But again, that's just defining APIs. The actual coding using those APIs requires (in almost all cases) an actual programming language.
HTML5 越来越多地接管(或已经接管)定义网页结构和API 以从编程语言与它们交互的角色。在 DOM 规范中,这曾经是相当独立的,但现在很多都被合并到 HTML5 规范中。但同样,这只是定义 API。使用这些 API 的实际编码需要(在几乎所有情况下)实际的编程语言。
回答by kidwon
HTML5 is considered a technology. Yes, there is 5th release of HTML markup language but probably you didn't mean that.
HTML5 被认为是一种技术。是的,有第 5 版 HTML 标记语言,但您可能不是那个意思。
HTML5 is more considered to be a technology including HTML,CSS3 and javascript and most of all their support in tools like browsers. So as a matter of fact it can be considered as something that requires programming.
HTML5 更多地被认为是一种包括 HTML、CSS3 和 javascript 在内的技术,并且最重要的是它们在浏览器等工具中的支持。所以实际上它可以被认为是需要编程的东西。