Pregunta

I'm new at HTML and need to do a simple site as an assignment. For the site navigation menu I guess it would be easy to simply copy and paste the navigation menu HTML onto all the pages in a header div. But is there a better way to do this?

for example, is there an easy way (that doesn't require scripting) to only write the code in one place and have it included on every page? I remember that I did something in Dreamweaver that created a template page that included the navigation menu. However I have a feeling that that was just copying html between pages.

¿Fue útil?

Solución

Without scripting your HTML files will need to contain the menubar in full.

You are describing what a server side scripting language can do. Without one - your HTML files are served as they are. Therefore they must contain the HTML for the menubar within them.

The comments mention using an iframe - though very creative - I believe it doesn't satisfy as being "a better way to do this"

Otros consejos

You have must use HTML code every page without HTML does't work Try to learn some basic PHP it will help

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top