01 logo

Why Does HTML Still Not Offer This Feature Natively

by Burk 3 days ago in tech news

Potentially the most underrated missing feature in web design

Photo by Valery Sysoev on Unsplash

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

Let me start this post with a quick disclaimer: HTML5 is awesome! So is CSS. I have no complaints about the general state of web technologies and web development. What we're nowadays able to do with only HTML and CSS is outstanding, compared to even a few years back when much of this was merely possible through JavaScript or other technologies.

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”?

Let me paint you a little picture: You've just developed a simple one-page design with HTML and CSS only, gorgeous, functional, and ready to go live. But then you decide to add another page. Possibly a privacy policy. We all need this nowadays, right?

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.

HTML Includes

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

<include src="./header.html"></include>

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.

Screenshot by author

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!

tech news

About the author


Hi, I’m Burk. I make money online. I write on Medium & design digital products on Gumroad. Let me tell you how → letters.byburk.net

Find us on social media

Miscellaneous links

  • Explore
  • Contact
  • Privacy Policy
  • Terms of Use
  • Support

© 2022 Creatd, Inc. All Rights Reserved.