开发者

What is the difference between learning HTML and learning a programming language? [closed]

开发者 https://www.devze.com 2022-12-24 22:49 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, bu开发者_JAVA技巧t this question will likely so
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, bu开发者_JAVA技巧t this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 9 years ago.

I learned HTML and CSS about 8 months ago, and recently, about 2 months ago I started learning Python and Ruby. I find it much harder/time consuming to understand and be able to put Python and Ruby into practice than it was HTML or CSS.

How is learning/understanding HTML and CSS, and being able to use them different from learning a programming language like Python or Ruby, and being able to put them in practice.


HTML is merely markup. It's more about data and layout in the particular space of browsers and the web. There's not much logic involved. There's nothing like looping or conditional constructs. It helps to know something about HTTP and how browser clients and servers communicate, but that's it.

Python, Ruby, and every other general purpose language out there include those extra complications that involve logic. They span more problem spaces than HTML, so they have to be more flexible and powerful.


HTML and CSS are presentation "languages" - they describe the contents of a document and how it should be presented.

Programming languages like Python, C#, C, C++, Delphi, BASIC, Clojure, etc are different in that they contain logic. You can't do things like branching and iteration in HTML.


HTML is a markup language used to produce documents.
CSS is used to style those documents.

Without Javascript, neither of them remotely resemble a regular procedural programming language like Python or Ruby.

To learn a (regular) real programming language, you need to understand basic programming constructs like variables, ifs, and loops; HTML and CSS have nothing like them.


I may sound strange but for me it was the other way around and HTML was way harder to learn than new programming languages. I learned programming long ago at a time there were no HTML around and grasped basic understanding of a few constructs (conditions, loop, variables, etc). These I found again when learning new languages, so learning new languages became easier and easier.

When I learnt HTML I saw no logic in it. Once you have learn the minimal syntax, all is about keeping in mind a bunch of arbitrary tags and obscure options (and whose behavior change from one browser to another).

I understand that is not the case for most people, probably because HTML is more like a static description of something.

Well, that is not the whole truth. Learning new languages became hard again for me at each change of programming paradigm, say from procedural like C to Object Oriented like Java, to functional like Haskell.

What I'm really saying is that I believe that any change of paradigm (basic assumptions of the domain) is hard. HTML and programming language are really different paradigm (programming arguably more complex as it's about describing changes and HTML describing state). When you go from one paradigm to another you have to learn some basic thruth again and it's hard.


For starters HTML is not a programming language...not by any definition I've ever seen. Let's put it this way...HTML isn't Turing Complete.

HTML is a mark up language. It allows you to associate symantical information with user defined data that can then be interpreted by a web browser for the purpose of displaying the user data.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号