Hacker News new | ask | show | jobs
by skybrian 3047 days ago
Re: "Amp for Email uses that language instead of HTML and CSS."

Is this correct? Looking at the example in the spec [1], it seems to be a subset of HTML.

[1] https://github.com/ampproject/amphtml/issues/13457

2 comments

Except you have to use <amp-img> tags instead of <img>. Same for video, audio, and iframe. https://www.ampproject.org/docs/reference/spec#html-tags
> Except you have to use <amp-img> tags instead of <img>

Those are just custom elements: https://html.spec.whatwg.org/multipage/custom-elements.html

Hmm, custom elements are an interesting loophole. If you define your own set of tags and provide JavaScript implementations for them, I guess it would run in a browser, but is it really the same language anymore, and does it matter?

I'm reminded of:

  #define BEGIN {
  #define END }
> is it really the same language anymore

Yes?

The analogy would be more like defining custom functions or classes not in the standard library. It's just encapsulation that can then be used by name. They can't be inserted arbitrarily regardless of syntax like a macro can be.

It is just a subset of HTML (as is amp). Most email providers that accept HTML formats already only accept a subset of HTML. This is just a different, more formally defined, subset.
I mean, HTML is just XML... these subsets are in many ways their own language.
HTML is an application of SGML / ISO8879. It defines its own domain and that's the scope of it. It's a leaf.

XML is a subset of SGML and can have further subsets and implementing applications I.e. it is a branch. As noted above, XHTML was a leaf on this branch.

So they are related but not equivalent.

It's not, technically. XHTML was a formally defined HTML subset of XML but it died.
Fair enough, my point stands though.