I want to set up m y web page so that if I edit anything on a nav bar I only have to edit it in one place, and not on other pages. How do I do this?

Dani AI

Generated

A few good options have already been suggested by , and . Which one to use depends on your hosting and maintenance workflow, but there are some practical checks and gotchas to keep in mind so a single-nav source actually stays reliable and accessible.

Avoid frames for new work — framesets are obsolete and cause problems with bookmarking, history, search engines and assistive tech (MDN: frameset is obsolete). Use a semantic navigation container (<nav>) and include a skip link so keyboard and screen-reader users can get to the page content quickly (MDN: nav element, WebAIM: skip links).

Common pitfalls and quick fixes:

  • Relative-link breakage: if the same nav HTML is used from pages at different folder levels, link paths can break. Use root-relative URLs (start with /) or set a base href so links resolve predictably (MDN: base element).
  • JS-inserted nav: always provide a non-JavaScript fallback or server-rendered alternative, and test that crawlers index the nav if SEO matters (Google: JavaScript SEO basics).
  • Caching and propagation: set sensible cache headers so updates appear promptly across users and environments.

Practical checklist before rolling out: confirm the nav is present in page source (or has a reliable server-side fallback), test keyboard/tab order and mobile layout, verify links at multiple directory depths, and run an accessibility/SEO audit (Lighthouse or similar). If Dreamweaver templates are convenient now, they work — but consider a component/partial workflow or build-time approach for longer-term maintainability.

Recommended Answers

All 4 Replies

You could go about this a couple of ways, depending on what scripting languages you are going to use. If you are using a server-side language such as PHP or ASP, you could use server side includes or database interaction to integrate your nav bar from a single location into multiple pages.

If you are using straight HTML, you could employ the 'old-school' method by using frames to create a navigation pane. The W3C has a good tutorial for learning about frames .

Thank you for your advice, I'm using Dreamweaver and Fireworks, so I think I'm going to use the Frame set way. Thanks again

Why not use a template within Dreamweaver. With that, you make how you want all o fyour pages to look (provided the design is the same). You make an editable region within the templated page that will house your page content. When you update your nav bar, you do it on the template and it will update all of the pages that the template is applied to.

I use javascript for my navigation and then simply call the script from each page.

That way I only need to update the javascript file.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.