How To Make Reuseable HTML Navigation Menus?

前端 未结 10 795
面向向阳花
面向向阳花 2021-01-02 04:41

I\'m sure this topic comes up all the time,
But I can\'t seem to fine a concise answer.

I\'ve got a vertical menu bar that I want to reuse in webpages (>20)

10条回答
  •  情歌与酒
    2021-01-02 05:19

    Server side includes are the way to go if you don't want to use a programming language.

    They take this form:

    
    

    and will be inserted in the page wherever you put that tag in your HTML. It requires server side parsing, so your web server must have server side includes enabled. You can try it out, and if it doesn't work, contact your server host to see if you can get them enabled. If it's Apache, there's a method of enabling them via .htaccess files as well.

提交回复
热议问题