r/ProgrammerHumor • • Jun 01 '23

Meme HTML is not a programming language

Post image
9.1k Upvotes

500 comments sorted by

View all comments

Show parent comments

59

u/[deleted] Jun 01 '23

Yeah, because when you refer to it, it is strange to always say "markup"

Like, instead of say "This is programmed in JS, HTML and CSS" say "This is programmed in JS, markuped in HTML and styled in CSS" every time , sounds stupid

0

u/[deleted] Jun 01 '23

[deleted]

0

u/[deleted] Jun 01 '23

Executing what?

C, Java, Rust, etc it's all just text with keywords that get compiled/interpreted.

Yes. And the difference is that they have keywords necessary to write programs. If I remove one keyword, if, from the C syntax I make it unusable as a programming language.

HTML has no control flow facilities, no way of handling input.
Hence: not a programming language.


<label>What is your name?</label>
<input type="text" id="name">
<div>
    <if valueOf="name" op="equals" stringVal="John">
        Johnny, good to see you again!
    <else>
        Hello ${name}, nice to meet you!
    <endif>
</div>

HTML would have to have something like that to be a programming language.

1

u/meyerdutcht Jun 02 '23

Declarative languages generally don’t have control flow. Are none of them programming languages? My “programming languages” coursework included prolog- no control flow there.

→ More replies (6)