如何使所有网页的布局相同 [英] How to make same layout for all web pages

查看:200
本文介绍了如何使所有网页的布局相同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在处理HTML我想问一个关于网站开发的问题。我开发一个网站,其中的基本布局保持相同,像菜单,侧边菜单等,但只有内容的变化。目前我有独立的.html文件用于所有网页。
任何一个告诉我是有一种方法,我可以使一个单独的文件具有共同的所有和调用它在我的HTML文件。我听说过CSS,但它只会改变风格和布局。
感谢

I am currently working on HTML I want to ask a question about website development.I am developing a website in which the basic layout remains same like menu, side menu etc but only the content changes.Currently I have make separate .html file for all web pages. Can any one tell me is there a way through which I can make a separate file having etc common to all and call it in my html file.I have heard about CSS but it will only change the style and layout. thanks

推荐答案

如果您的HTTP(apache 2 IIS do)服务器支持服务器端包含,那么您可以只包括另一个HTML文件:

If your HTTP (apache 2 and IIS do) server supports Server Side Includes then you can just include another HTML file :

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

your content

<!--#include file="footer.html"-->

不需要服务器端语言 - 只需纯HTML

no need for a server side language then - just plain HTML

这篇关于如何使所有网页的布局相同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆