Why can't HTML alone do includes?
frontendmasters.com
Why can't HTML alone do includes?
1–10 of 367 posts
Re: Why can't HTML alone do includes?
#2Iframes, while not perfect, are pretty close though...
Re: Why can't HTML alone do includes?
#3If you want to include HTML sandboxes, we have iframes. If you want it served from the server, it's just text. Putting text A inside text B is a solved problem.
Re: Why can't HTML alone do includes?
#4The simplest answer is that HTML wasn't designed as a presentation language, but a hypertext document language. CSS and Javascripts were add-ons after the fact. Images weren't even in the first version. Once usage of the web grew beyond the initial vision, solutions like server-side includes and server-side languages that rendered HTML were sufficient.
Re: Why can't HTML alone do includes?
#5FTA
> We’ve got , which technically is a pure HTML solution, but
And then on the following paragraph..
> But none of the solutions is HTML
> None of these are a straightforward HTML tag
Not sure what the point is. Maybe just complaining
Re: Why can't HTML alone do includes?
#6Iframes, while not perfect, are pretty close though...
Making iframes be the right size is super awkward. I might actually use them more if they were easy to get responsive.
This post does link to a technique (new to me) to extract iframe contents:
Re: Why can't HTML alone do includes?
#7There used to be a thing for this
Re: Why can't HTML alone do includes?
#8Have you ever heard of Server Side Includes?
Re: Why can't HTML alone do includes?
#9FTA > We’ve got , which technically is a pure HTML solution, but And then on the following paragraph.. > But none of the solutions is HTML > None of these are a straightforward HTML tag Not sure what the point is. Maybe just complaining
Iframe is stuck in a rectangular box. It's not really suitable for things like site wide headers, footers and menus.
Re: Why can't HTML alone do includes?
#10Have you ever heard of Server Side Includes? https://en.wikipedia.org/wiki/Server_Side_Includes
That's mentioned in TFA under "old school web server directives".