DEV Community

Discussion on: Feedback on personal website

 
omarfarooq profile image
Mohammad Omar Farooq Khan

logic is a sensible reason or way of thinking

Javascript or PHP is a programming language because you can use variables, conditions, loops etc. HTML is not a programming language because you have write tags and can't use variables or conditions. HTML stands for Hyper Text Markup Language. So, HTML is a Markup Language not a Programming Language

Thread Thread
 
alvaromontoro profile image
Alvaro Montoro
  1. That is the dictionary definition of "logic", and not the definition of programming logic.
  2. A mark-up language can be a programming language. They are not mutually exclusive concepts.
  3. HTML has control structures that allow the conditional display of elements (e.g. open in details or dialog) and transitions between pages/states without needing external languages like JS or CSS.
  4. HTML is not Turing complete, but it is enough to create models of computation such as finite-state automata.
Thread Thread
 
alvaromontoro profile image
Alvaro Montoro

It all boils down to what the definition of a programming language is. If we take Turing-completeness as the sole criterion then HTML is not a programming language. But the selection of that criterion is subjective in itself. Not all programming languages are Turing complete. A Turing machine is a mathematical model and not a definition for a programming language.