HTML 被认为是一种编程语言吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/145176/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-28 22:24:51  来源:igfitidea点击:

Is HTML considered a programming language?

html

提问by brian d foy

I guess the question is self-explanatory, but I'm wondering whether HTML qualifies as a programming language (obviously the "L" stands for language).

我想这个问题是不言自明的,但我想知道 HTML 是否有资格作为一种编程语言(显然“L”代表语言)。

The reason for asking is more pragmatic—I'm putting together a resume and don't want to look like a fool for listing things like HTML and XML under languages, but can't figure out how to classify them.

问的原因比较务实——我正在整理一份简历,不想看起来像个傻瓜,将诸如 HTML 和 XML 之类的东西列在语言下,但又不知道如何对它们进行分类。

回答by brian d foy

No, HTML is not a programming language. The "M" stands for "Markup". Generally, a programming language allows you to describe some sort of process of doing something, whereas HTML is a way of adding context and structure to text.

不,HTML 不是一种编程语言。“M”代表“标记”。通常,编程语言允许您描述某种做某事的过程,而 HTML 是一种向文本添加上下文和结构的方式。

If you're looking to add more alphabet soup to your CV, don't classify them at all. Just put them in a big pile called "Technologies" or whatever you like. Remember, however, that anything you list is fair game for a question.

如果你想在你的简历中添加更多的字母汤,根本不要对它们进行分类。只需将它们放在称为“技术”或您喜欢的任何东西的大堆中。但是,请记住,您列出的任何内容都是针对问题的公平游戏。

HTML is so common that I'd expect almost any technology person to already know it (although not stuff like CSS and so on), so you might consider not listing every initialism you've ever come across. I tend to regard CVs listing too many things as suspicious, so I ask more questions to weed out the stuff that shouldn't be listed. :)

HTML 是如此普遍,以至于我希望几乎所有技术人员都已经知道它(尽管不是像 CSS 之类的东西),因此您可能会考虑不列出您遇到的每个首字母缩写词。我倾向于认为简历中列出了太多的东西是可疑的,所以我会问更多的问题来剔除不应该列出的东西。:)

However, if your HTML experience includes serious web design stuff including Ajax, JavaScript, and so on, you might talk about those in your "Experience" section.

但是,如果您的 HTML 体验包括严肃的网页设计内容,包括 Ajax、JavaScript 等,您可能会在“体验”部分讨论这些内容。

回答by Chris Pietschmann

YES, a declarative programming language.

是的,一种声明式编程语言。

You really want to list the most important things you know that are relative to the job you're applying for on your resume. If you list ASP.NET but don't list HTML, even though it's somewhat obvious, there are a lot of managers and/or HR types that will assume you don't know HTML since it's not listed. I've had it happen to me before.

您真的想在简历中列出与您申请的工作相关的最重要的事情。如果您列出 ASP.NET 但不列出 HTML,即使它有些明显,也有很多经理和/或 HR 类型会假设您不了解 HTML,因为它没有列出。我以前也遇到过这种情况。

Update - Some say no it isn't a programming language, and you may not agree with me on this, but regardless on a resume it IS a programming language. You get HR types looking at your resume before the hiring manager even sees it. If the manager says you need to know HTML, and it's not listed in the 'programming languages' section then the HR person may disregard you resume thinking you don't know it because it's not listed.

更新 - 有人说不,它不是一种编程语言,你可能不同意我的观点,但无论在简历上它是一种编程语言。您让 HR 类型在招聘经理看到之前查看您的简历。如果经理说您需要了解 HTML,并且它没有列在“编程语言”部分中,那么 HR 人员可能会忽略您的简历,认为您不知道它,因为它没有列出。

Update 6-8-2012: Any instruction that tells the computer to do something is a programming language. So even after all these years, I still stand by my answer. HTML is a programming language. Something that isn't a programming language would be XML.

2012 年 6 月 8 日更新:任何告诉计算机做某事的指令都是一种编程语言。所以即使过了这么多年,我仍然坚持我的答案。HTML 是一种编程语言。XML 不是编程语言。

回答by Jonny Buchanan

No, the clue is in the M - it's a Markup Language.

不,线索在 M - 它是一种标记语言

回答by Martin Beckett

On some level Chris Pietschmann is correct. SQL isn't Turing complete(at least without stored procedures) yet people will list that as a language, TeXis Turing complete but most people regard it as a markup language.

在某种程度上,Chris Pietschmann 是正确的。SQL 不是图灵完备的(至少在没有存储过程的情况下),但人们会将其列为一种语言,TeX是图灵完备的,但大多数人将其视为一种标记语言。

Having said that: if you are just applying for jobs, not arguing formal logic, I would just list them all as technologies. Things like .NET aren't languages but would probably be listed as well.

话虽如此:如果你只是申请工作,而不是争论形式逻辑,我会把它们都列为技术。.NET 之类的东西不是语言,但也可能会被列出。

回答by Mark Roddy

The 'M' stands for a 'Markup'. It's a 'Markup Language' not a programming language. Some people will disagree with this, but my opinion is that if it lacks logical constructs (conditional branching, iteration, etc) its not really a programming language.

“M”代表“标记”。它是一种“标记语言”,而不是一种编程语言。有些人会不同意这一点,但我的观点是,如果它缺乏逻辑结构(条件分支、迭代等),它就不是真正的编程语言。

As for the resume, I would suggest putting HTML and XML under a section like 'Technologies'. I usually have a section like this where I list things like version control software, OS's I've developed for, build systems, etc.

至于简历,我建议将 HTML 和 XML 放在“技术”之类的部分下。我通常有一个这样的部分,其中我列出了诸如版本控制软件、我为其开发的操作系统、构建系统等内容。

回答by houston

If you're going to say that HTML is a programming language, then you might as well include things such as word documents, as they too are based on ML, or 'Markup Language'.

如果您要说 HTML 是一种编程语言,那么您不妨包含诸如 Word 文档之类的内容,因为它们也是基于 ML 或“标记语言”。

So, no, HTML is a not a programming language. It is called "markup" for that reason.

所以,不,HTML 不是一种编程语言。出于这个原因,它被称为“标记”。

Simply put--HTML defines content!

简单地说——HTML 定义了内容!

回答by paulosuzart

I think not exactly a programming language, but exactly what its name says: a markup language. We cannot program using just pure, HTML. But just annotate how to present content.

我认为不完全是一种编程语言,但正如它的名字所说:标记语言。我们不能只使用纯 HTML 进行编程。但只需注释如何呈现内容。

But if you consider programming the act of tell the computer how to present contents, it is a programming language.

但是,如果您将编程视为告诉计算机如何呈现内容的行为,那么它就是一种编程语言。

回答by Michael Ekstrand

In the advanced programming languages class I took in college, we had what I think is a pretty good definition of "programming language": a programming language is any (formal) language capable of expressing all computable functions, which the Church-Turing thesisimplies is the set of all Turing-computable functions.

在我在大学上的高级编程语言课程中,我们对“编程语言”有一个我认为非常好的定义:编程语言是能够表达所有可计算函数的任何(形式)语言,丘奇-图灵论文暗示了这一点是所有图灵可计算函数的集合。

By that definition, no, HTML is not a programming language, even a declarative one. It is, as others have explained, a markup language.

根据该定义,不,HTML 不是一种编程语言,甚至不是一种声明性语言。正如其他人所解释的那样,它是一种标记语言。

But the people reviewing your resume may very well not care about such a formal distinction. I'd follow the good advice given by others and list it under a "Technologies" type of section.

但是查看你简历的人很可能不关心这种正式的区别。我会遵循其他人给出的好建议,并将其列在“技术”类型的部分下。

回答by sledgebox

I think that it definitely has its place on a resume. Knowledge of HTML is valuable, and there really is a lot to know, what with cross-browser compatibility issues and standards which should be followed.

我认为它肯定在简历上占有一席之地。HTML 的知识很有价值,而且确实有很多东西需要了解,跨浏览器兼容性问题和应该遵循的标准。

I wouldn't list HTML under "programming languages" alongside C# or something, but it's worth noting your experience.

我不会将 HTML 与 C# 或其他东西一起列在“编程语言”下,但值得注意的是您的经验。

回答by Simon

No - there's a big prejudice in IT against web design; but in this case the "real" programmers are on pretty firm ground.

不 - IT 部门对网页设计有很大的偏见;但在这种情况下,“真正的”程序员的立场非常坚定。

If you've done a lot of web design work you've probably done some JavaScript, so you can put that down under 'programming languages'; if you want to list HTML as well, then I agree with the answer that suggests "Technologies".

如果你做过很多网页设计工作,你可能已经做过一些 JavaScript,所以你可以把它放在“编程语言”下;如果您还想列出 HTML,那么我同意建议“技术”的答案。

But unless you're targeting agents who're trying to tick boxes rather than find you a good job, a bare list of things you've used doesn't really look all that good. You're better off listing the projects you've worked on and detailing the technologies you used on each; that demonstrates that you've got real experience of using them rather than just that you know some buzzwords.

但是,除非你的目标是那些试图打勾而不是给你找到一份好工作的代理商,否则你用过的东西的清单看起来并不是那么好。你最好列出你参与过的项目并详细说明你在每个项目上使用的技术;这表明您拥有使用它们的真实经验,而不仅仅是知道一些流行语。