Why Does HTML Still Not Offer This Feature Natively
Potentially the most underrated missing feature in web design
I've run into this issue countless times. And I am not even a full-time web developer. I do this for fun. But the absence of this feature is blatantly obvious. Or is it just me? Let's explore!
HTML5 is awesome
To the point
In all these years though, I've been missing a feature in HTML that to me is a no-brainer addition. But as I questioned in the intro, is it just me?
Maybe this feature would take away a chunk of what PHP is good for. Because to work around this missing feature I, and possibly many of you, turn to PHP.
Why is this feature “missing”?
Here's the problem: I've created a cool header, a nice little menu, and a footer. And what do I have to do to create another page? Right, copy all those HTML elements over to the privacy.html file. And only change the main content area in between. You see where I'm going with this, don't you?
Sure, it's no real hassle. Copying and pasting don't take much time. This is not the issue, though, is it? What if I change a small detail in the footer? I'd have to remember to change it in both HTML files. Still do-able. But now picture having a handful of pages, or even dozens. Do you really want to copy and paste every small change to all these files manually? I don't.
It baffles me that HTML never had, and as it looks like never will have, a simple include dynamic to reference parts of or whole HTML files from another HTML file.
You know, a simple
This way, we could design our headers, footers, menus, sidebars, and add them to our main content, however many main content files we need.
Quick PHP fix
Includes are not a real issue, of course. PHP offers a simple and quick solution for exactly that problem. You just rename your files to .php and add an include function to your index file that references header, footer, menu, etc.
PHP handles this include function at the server-side level and that's quick enough for me. Other architectures have similar workarounds to go about this issue: For example Grunt or Gulp.
What it boils down to
We can solve anything in modern web development. The sky's the limit. A quick PHP fix is all we need to work around this missing feature.
Still, there is something about native HTML, the purity and beauty of plain HTML, that has me wishing for an include feature with basic web markup language. Is that just me?
P.S.: First of all, you should get my posts in your inbox. Do that here!
Secondly, if you like to experience Vocal yourself, consider supporting me and thousands of other writers by signing up for a membership. It only costs $9.99 per month, it supports us, writers, greatly, and you have the chance to make money with your writing as well. If you do so, thank you a million times!