Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well said this is many students' intro to PHP. Why not `<include src=header.html/>` though?

Some content is already loaded asynchronously such as images, content below the fold etc.

> HTML is really just a markup syntax, not a programming language

flamebait detected :) It's a declarative language, interpreted by each browser engine separately.



What's the ML in HTML stand for? I think that's probably the crux of the argument. Are we gonna evolve it past its name?


If the issue is that "include" somehow makes it sound like it's not markup, the solution seems obvious. Just use the src attribute on other tags:

<html src="/some/page.html">, <div src="/some/div.html">, <span src="/some/span.html">, etc.

Or create a new tag that's a noun like fragment, page, document, subdoc or something.

Surely that's no less markup than svg, img, script, video, iframe, and what not.


It stands for "markup language", and was inherited from SGML, which had includes. Strictly speaking, so did early HTML (since it was just an SGML subset), it's just that browsers didn't bother implementing it, for the most part. So it's not that it didn't evolve, but rather it devolved.

Nor is this something unique to SGML. XML is also a "markup language", yet XInclude is a thing.


> It stands for "markup language", and was inherited from SGML, which had includes

touchay!!


That's why I joked about flamebait, it's hypertext though, aren't anchors essentially a goToURL() click handler in some ways? Template partials seem like a basic part of this system.

> considered to be server-side

Good point! Wouldn't fetching a template partial happen the same way (like fetching an image?)


> What's the ML in HTML stand for?

I always assumed it stood for my initials.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: