5
arnavop
356d

HTML is a programming language.

Comments
  • 2
    Not really. It is a layout language that describes the structure of a document. It doesn't have any logic structures that define its behavior at all, such as if/else or loops or the like.

    That doesn't make it any less of a skill to know how it works, it just isn't a *programming* language.
  • 3
    I’d seriously argue the distinction between which code is programming and which is not - is kind of an irrelevant detail. HTML is a computer language that is central to web development.

    You can add elements with JS. You can add an element decleratively with HTML. To separate these approaches and say that ”only one is programming” is irrevelant. - both are coding. Both are web development.

    The fact that HTML is also ”just document markup” is not all that relevant.
  • 3
    Nah, its Hyperbolic Translation Machine Learning language for drones.
  • 2
    @jiraTicket I think programming languages should be called computing languages. My original exposure to program and programming had to do with outlines for theater and television productions. Then we have the further complication of telling people how to program their VCR or DVR to record a show. So it feels diluted in some cases. I think we are at the mercy of inertia here though.

    HTML is interesting. It has hooks for computing languages built in. So its kind of like an extensible language. HTML for web almost never exists on its own.
  • 3
    Some of u didn’t see the tags lol
  • 0
    @jiraTicket Only one aspect of your example is actually programming, namely the programatic changing of the structure of the document. Editing HTML directly on its own is not programming. It's editing a document. You wouldn't say making changes to a Word doc is programming, would you?
  • 2
    If we include CSS and a user, it’s Turing-complete. Heck, I can even hook it up to a database.

    It’d be an Eldritch horror, but hey.
  • 0
    @Root IndexedDB :)
  • 2
    @shovethisrant wrong tag - hence we take the statement seriously 🫡
    /s
  • 1
    @cuddlyogre literally everything I do all day is editing text into meaningful useful patterns. The context determines the effect of the output when processed by external software. So "programming" is determined by my thought processes when modifying the text. Which are very different between html and c++ for instance. So is it the language that determines this or the thinking about the language?

    I get both sides of this. I spent a whole day programming (some of it included presentation details, and some of it included algorithms). A series of print statements in php to produce HTML is not radically different than editing an HTML document. But php gives me fancier tools to be less verbose. No, you aren't going to do any calculations in HTML, but as soon as you add the <script> tag and put some JS in there you are magically programming now.
  • 0
    To add further confusion. If you program in XSLT in an HTML document you can do loops and I think it is Turing complete. Not sure if that is part of the HTML spec thought.
  • 0
    @Demolishun Even though the result is HTML, you are programming in PHP.

    Adding a script tag mean you will be programming in javascript to add/modify HTML. It is declaring to the browser that you want this element to be treated like js, just like a p tag tells the browser you want to display the text like a paragraph.

    The only way editing HTML can be considered programming is if you treat it the same as programming an oldschool machine with a punchcard, but you're programming the browser to do certain things. But at that point, any input at all into a computer is programming.
  • 3
    In general, data is either interpreted - then it's code. Or it's not interpreted - then it's useless.

    Joke or not: HTML is indeed a programming language executed by an HTML parser.
  • 1
    Sometimes I bang objects together and pretend that I’m creating code
  • 1
    yall need to chill...
  • 2
    I taught my kids to smoke crack and now they are contributing to W3C specs - so proud of them 🥰
  • 0
    @cuddlyogre I'm mostly talking about editing html templates, so the general structure. I'd say changing the markup of a single article wouldn't be development but editing the markup of a template is development, if it's part of the core website.
  • 2
    @shovethisrant i saw the tags and I'm fully aware it was intended as a joke but wanted to take it a step further.
  • 0
    @jiraTicket I don't disagree with you that it is development. But it isn't programming. It's editing a document. Programming is one part of development.

    If programming is "providing any input to change the behavior of a computer", then moving the mouse is programming.

    It always feels like there are hurt feelings when it is suggested that HTML isn't a *programming* language, which is baffling to me.
  • 1
    @cuddlyogre if it’s a single document I agree

    But I’m thinking of editing html in a template engine. Such as the base html template for the entire site. I wouldn’t call that just a document or liken it to mouse movement input.

    I’d be fine if people talk about application coding.

    What baffles me is just when devs seem to argue code is either real programming or other - and the other category is put in the same bracket as moving a mouse or editing a word doc
  • 1
    An argument from computerphile https://youtu.be/4A2mWqLUpzw/...
  • 1
    And it’s not that I’m personally just writing html and feeling butthurt that my craft isn’t called programming.

    It’s just that I’ve heard juniors write html tags programmatically in a weird way saying stuff along the lines of ”feels good to code like a real dev, unlike the html templates i used earlier. Html isn’t programming lol” while not realising there’s no significant difference

    I just felt like the ”it isn’t programming” is so binary and goes to people’s heads
  • 0
    @jiraTicket If it’s a templating engine like Liquid or erb, it’s not html anymore. It’s that templating language with html output.
  • 0
    I cannot imagine why there would ever be any confusion:

    https://geeksforgeeks.org/programmi...

    https://code.visualstudio.com/Docs/...

    https://khanacademy.org/computing/...

    https://csestack.org/html-program-e...

    The term programming is diluted as hell.

    customer: I need you to program this website.

    developer: I can't do that. But I can edit this website.

    customer: No, I need it programmed in HTML.

    developer: You don't program HTML. You edit HTML.

    customer: Are you joking?

    developer: No, HTML is edited, not programmed.

    customer: What is the difference?

    developer: HTML is not turing complete, it cannot compute.

    customer: Turing what? Are you flexing on me?

    developer: I am explaining the difference.

    customer: So you mansplaining me? I think I am going to find someone else that knows how to do this.
  • 0
    @Demolishun They stopped putting me in front of clients a long time ago because I am that specific about this kind of thing. I have dedicated the last ~25 years to this and I'm not about to let people's feelings, especially the feelings of people outside of the industry, redefine my craft.
  • 0
    Watch the episode of computerphile regarding html
Add Comment