LurkerAspect
Now officially a Super Lurker
- Reaction score
- 118
Hi there
I've recently started learning how to make websites with HTML and CSS for university/college, and I was wondering if it's possible to import a specific area of code that I can define outside the website, and use across multiple webpages? In other words, is it possible to create an external file with a few lines of code, then import that snippet of code into multiple web pages?
Basically I'm making a website with 16 pages, and I don't want to have to modify the navigation bar's links for every single page, which means making about 16 links for 16 pages, which comes out to 256 links I'll need to type out/copy-paste.
If you're still confused, I'll try to illustrate: Here's the code snippet:
I want to be able to import this snippet so I don't have to write it out again on every single page. Is that possible?
Any help is greatly appreciated
I've recently started learning how to make websites with HTML and CSS for university/college, and I was wondering if it's possible to import a specific area of code that I can define outside the website, and use across multiple webpages? In other words, is it possible to create an external file with a few lines of code, then import that snippet of code into multiple web pages?
Basically I'm making a website with 16 pages, and I don't want to have to modify the navigation bar's links for every single page, which means making about 16 links for 16 pages, which comes out to 256 links I'll need to type out/copy-paste.
If you're still confused, I'll try to illustrate: Here's the code snippet:
Code:
<div id="quicklinks">
<a href="pg1">Home</a>
<a href="pg2">Accomodation</a>
<a href="pg3">Entertainment</a>
<a href="pg4">Shopping</a>
</div>
Any help is greatly appreciated