XHTML Club
xhtml.club
XHTML Club
1–10 of 131 posts
Re: XHTML Club
#2> you should master the HTML programming¹ language
The footnote reads:
> 1. This is a common debate - but for simplicity sake I'm just calling it this.
It's not really a debate, HTML is a markup language [1], not a programming language: you annotate a document with its structure and its formatting. You are not really programming when you write HTML (the markup is not procedural) (and this is not gatekeeping, there's nothing wrong about this and doesn't make HTML a lesser language).
To avoid the issue completely, you can phrase this as: "you should master HTML" and remove the footnote. Simple, clean, concise, clear. By the way, ML already means "Markup Language", so any "HTML .* language" phrasing can feel a bit off.
Re: XHTML Club
#3In the linked article: > you should master the HTML programming¹ language The footnote reads: > 1. This is a common debate - but for simplicity sake I'm just calling it this. It's not really a debate, HTML is a markup language [1], not a programming language: you annotate a document with its structure and its formatting. You are not really programming when you write HTML (the markup is not procedural) (and this is no…
But if we use a broader definition, basically "a formal language that specifies behavior a machine must execute", then HTML is indeed a programming language.
HTML is not only about annotating documents or formatting, it can do things you expect from a "normal" programming language too, for example, you can do constraints validation:
That's neither annotating, just a "document" or just formatting. Another example is using + and you have users mutating state that reveals different branches in the page, all just using HTML and nothing else.In the end, I agree with you, HTML ultimately is a markup language, but it's deceiving, because it does more than just markup.
Re: XHTML Club
#4To quote [0]:
> All those “Valid XHTML 1.0!” links on the web are really saying “Invalid HTML 4.01!”.
Although the article is 20 years old now, so these days it’s actually HTML5.
Edit: Checked the other member sites. Only two are served as application/xhtml+xml.
[0]: https://webkit.org/blog/68/understanding-html-xml-and-xhtml/
Re: XHTML Club
#5In the linked article: > you should master the HTML programming¹ language The footnote reads: > 1. This is a common debate - but for simplicity sake I'm just calling it this. It's not really a debate, HTML is a markup language [1], not a programming language: you annotate a document with its structure and its formatting. You are not really programming when you write HTML (the markup is not procedural) (and this is no…
I dunno, you're being pedantic :) Yes yes, the name clearly ends up "Markup Language" so yeah, with a very strict definition of programming languages, HTML is not one of them. But if we use a broader definition, basically "a formal language that specifies behavior a machine must execute", then HTML is indeed a programming language. HTML is not only about annotating documents or formatting, it can do things you expect…
It might be, I'm usually not, but this is all xhtml.club and this footnote are about, might as well be correct :-)
Constraint validation is still descriptive (what is allowed)
All details and summary are doing is conveying information on what's a summary and what's the complete story, and it has this hidden / shown behavior.
In any case, you will probably find something procedural / programming like in HTML, but it's not the core idea of the language, and if you are explaining what HTML is to a newbie, I feel like you should focus to the essential. Then we can discuss the corners between more experienced people.
In the end, all I'm saying is: you can just avoid issues and just say "HTML" without further qualifying it.
Re: XHTML Club
#6It’s ironic that the very site in question, despite claiming XHTML compliance, is served as text/html instead of application/xhtml+xml, so the browser will never parse it as XML. To quote [0]: > All those “Valid XHTML 1.0!” links on the web are really saying “Invalid HTML 4.01!”. Although the article is 20 years old now, so these days it’s actually HTML5. Edit: Checked the other member sites. Only two are served as a…
Not having it is XHTML compliant though, so it could just be removed.
Re: XHTML Club
#7However no browsers have implemented streaming XHTML parsers. This means that the performance is notably worse for XHTML and if you rely on streaming responses (I currently do for a few pages like bulk imports) it won't work.
Re: XHTML Club
#8I would really like to use XHTML. It would make my HTML emitter much simpler (as I don't need special rules for elements that are self-closing, have special closing or escaping rules and whatever else) and more secure. However no browsers have implemented streaming XHTML parsers. This means that the performance is notably worse for XHTML and if you rely on streaming responses (I currently do for a few pages like bulk…
Dang, I hadn't considered this. That's something to add to the "simplest HTML omitting noisy tags like body and head vs going full XHTML" debate I have with myself.
One for XHTML: I like that the parser catches errors, it often prevent subtle issues.
Re: XHTML Club
#9In the linked article: > you should master the HTML programming¹ language The footnote reads: > 1. This is a common debate - but for simplicity sake I'm just calling it this. It's not really a debate, HTML is a markup language [1], not a programming language: you annotate a document with its structure and its formatting. You are not really programming when you write HTML (the markup is not procedural) (and this is no…
Better question, why don't we upgrade XML to do that?
Re: XHTML Club
#10In the linked article: > you should master the HTML programming¹ language The footnote reads: > 1. This is a common debate - but for simplicity sake I'm just calling it this. It's not really a debate, HTML is a markup language [1], not a programming language: you annotate a document with its structure and its formatting. You are not really programming when you write HTML (the markup is not procedural) (and this is no…
If all you're doing is using HTML to "annotate a document with its structure and its formatting", then yes, I'll accept that it's not quite programming, but I've not seen this approach of starting with a plain non-html document and marking it up by hand done in probably over two decades. I do still occasionally see it done for marking up blog posts or documentation into markdown and then generating html from it, but even that's a minuscule part of what HTML is used for these days.
Your mileage my vary, but what I and people around me typically do is work on hundreds/thousands of loosely coupled small snippets of HTML used within e.g. React JSX, or Django/Jinja templates or htmx endpoints, in order to dynamically control data and state in a large program. In this sense, while the html itself doesn't have control flow, it is an integral part of control flow in the larger system, and it's extremely likely that I'll break something in the functionality if I carelessly change an element's type or attribute value. In this sense, I'm not putting on a different hat when I'm working on the html, but just working on a different part of the program.