There's two strategies. You can either use a backend server to create the other pages, and then put links in your webpage to request them directly. Alternatively, you can use JavaScript to dynamically update the page that's already loaded. This is usually easier with a framework, the larger frameworks tend to have a solution for this built-in. The specifics will depend on the tool you use, and I think the simpler solution is to build a backend that can build each page you need.
If the purpose is to exercise your CSS, and you dont want to branch out into a whole other tool, unfortunately I think you'd have an easier time if you can restrict your design to one page. While there are some relatively smooth ways to get started writing a backend, it is still going to involve learning some very non-CSS-related topics.
Well, you can create multiple web pages each in isolation. Then, you can use the <a> tag to create links. Without a server, I think what your teacher wants is to use relative paths. So, if you have an index.html and a history.html, or whatever your other page will be, you can create an HTML element Like <a href="history.html">History Page</a> on your main page. When you open it locally in your browser, that link should work as long as your HTML files are stored in the same folder.
EDIT: looks like you got this answer several times!
There's two strategies. You can either use a backend server to create the other pages, and then put links in your webpage to request them directly. Alternatively, you can use JavaScript to dynamically update the page that's already loaded. This is usually easier with a framework, the larger frameworks tend to have a solution for this built-in. The specifics will depend on the tool you use, and I think the simpler solution is to build a backend that can build each page you need.
Thank you. It's an assignment to test my css skills so I'm going to push it to github. Also, I don't know javascript
If the purpose is to exercise your CSS, and you dont want to branch out into a whole other tool, unfortunately I think you'd have an easier time if you can restrict your design to one page. While there are some relatively smooth ways to get started writing a backend, it is still going to involve learning some very non-CSS-related topics.
Oh my teacher said it had to be more than one page while using just html and CSS
Well, you can create multiple web pages each in isolation. Then, you can use the
<a>
tag to create links. Without a server, I think what your teacher wants is to use relative paths. So, if you have anindex.html
and ahistory.html
, or whatever your other page will be, you can create an HTML element Like<a href="history.html">History Page</a>
on your main page. When you open it locally in your browser, that link should work as long as your HTML files are stored in the same folder.EDIT: looks like you got this answer several times!
Alright this looks simple enough. I'll get to work on it. Thanks a lot!