mplis
mplis

Reputation: 768

Import HTML without using PHP?

Is there a way to import a block of HTML into a file without the use of something like PHP or Javascript? For my personal website, any time I make a small change to the content of my navbar, I have to go to all of my other pages and make that same change.

Upvotes: 1

Views: 330

Answers (2)

898247
898247

Reputation: 10606

No feature like the one you described is in the HTML spec, but if you don't have access to server configurations and the like, you can write your code in a language like HAML and compile it, which would accomplish what you described without any server-side work.

Upvotes: 0

selbie
selbie

Reputation: 104559

Do an internet search for "Server Side Includes for HTML"

Here's a good start: http://en.wikipedia.org/wiki/Server_Side_Includes

Example:

<!--#include virtual="header.html" -->

Upvotes: 3

Related Questions