HTML and CSS are Programming Languages
Monday, September 23, 2024Wait! What!? Why!?
First of all, let’s start from what is programming?
What is programming?
It’s activity to write a computer programs.
What is programming language?
It’s a language to give instructions to a computer.
What is programming paradigm?
The term of paradigm in a programming is a general classification or model or style of doing something. There are two main classification in programming paradigms: imperative and declarative.
Imperative programming refers to code that tells computer “how” to do something. Declarative programming refers to code tells computer “what” to do. The main difference between imperative programming and declarative programming is the imperative programming has control flow and declarative programming doesn’t. The control flow in imperative programming refers to the ability to manipulate the order of execution of statements in a program. Example keywords are if else
, while
, for
loop.
There are programming languages that used imperative programming: JavaScript, PHP, Python, Go, Rust, C, Ruby, C++, Zig, etc. Meanwhile, example of declarative programming languages are domain specific language for example SQL is programming language to query database, HTML is programming language for markup and create meaningful content on web, and CSS is programming language for style and layout on web.
Wait! You say that HTML and CSS are programming languages? Non sense!
Previously, I doubt that HTML and CSS are programming languages. But, after I listen explaination from Lara Schenk about CSS algorithm and supporting arguments from Heydon and Professor Brailsford about HTML is a programming language, I’m more confident to say that HTML and CSS are programming languages. To be more precise: HTML and CSS are domain specific programming languages to build web page. HTML is a programming language to make meaningful content on web and CSS is a programming language for styling the content on web.
Reference