7
10Dev
59d

I was talking to a friend, and they were arguing that HTML was in fact a programming language. Their main argument was that you needed HTML to make a website.

I told them you could use something like React, and they said it doesn't count since you're still writing was is basically HTML

As a result, I will be writing an entire and actually decent webapp in nothing but vanilla JavaScript to prove him wrong. Just a <head> section and a body that loads a JavaScript file

Wish me luck

Comments
  • 5
    Not 1 HTML tag!
    🚩

    And that includes jsx and exporting HTML back to be rendered.
  • 0
    I'm not really sure I follow his reasoning.

    Although I also don't really care if someone called HTML a programming language or not.

    There's probably a right answer to that but I don't really have much reason to care either ;)
  • 0
    They are counting JS in HTML, and thus, as per functionality, HTML is a programming language though it's actually JS.
  • 0
    Reference implementation is not the same as specification. Council shall immediately surrender their right to argue about HTML!
  • 1
    You are correct.

    JSX is JS only, the HTML tags that you write there are 'syntax sugar'.

    No HTML there, its all just JS that looks like HTML.
  • 1
    serious question: if you append child nodes right from the start you have technically just written

    <html>
    <head>
    <script src... ></script>
    </head>
    </html>

    right? not like this might be the *best* possible way... no time to proof that myself rn, though.
  • 1
    @devJs still HTML, sugar or not.
  • 1
    How the fuck does needing it to make websites means programming language?
    By that logic, Microsoft word is a programming language, and so is PDF and other file formats, that's not what defines a programming language.
  • 1
    If HTML is a programming language then I am a yaml developer 😂
  • 0
    Well technically, html is a programming language. A descriptive one: it can describe something somewhat "fixed". Js, C++ etc. are processing languages : they can describe a process.

    That's all for the theoretical precision nobody cares about 😅
  • 1
    @C0D4 well, in the end of the line you will see HTML via DevTools and such, because they allow so. However, DOM manipulations remain for the scripting. And JSX is exactly a scripting *the* template, chaining createElement functions behind sugar-coated syntax.
    It may be HTML-compliant, but not as much as templates in Vue single-file components, because in JSX you need braces for dynamic attributes. =)
  • 1
    @vintprox don't defend this.

    A template contains HTML, regardless what you want to call it, or how much abstracted sugar you want to put on it. If your rendering HTML from the server side, then your rendering HTML.

    There's no difference between handing a <div> in a .HTML file and adding let div = <div> and spitting that up to the client side, someone still wrote HTML somewhere.

    The argument OP has is, he can write a website without HTML, I'm simply highlighting he's own requirements.
Add Comment