Find Related products on Amazon

Shop on Amazon

Why can't HTML alone do includes?

Published on: 2025-05-11 20:50:55

I’m obsessed with this basic web need. You’ve got three pages: index.html about.html contact.html You need to put the same header on all three pages. Our developer brains scream at us to ensure that we’re not copying the exact code three times, we’re creating the header once then “including” it on the three (or a thousand) other pages. There are so many solutions to this problem We don’t need to list them all here. I documented some of them one time, but there are many more. We’ve got JavaScript to go fetch the HTML and insert it. We’ve got old school web server directives. Any static site generator can do it. Task runners can do it. Templating languages tend to have include functionality. Any backend language can generate HTML on the fly. I’ve seen several Web Components purpose-built for this. We’ve got