Search code examples
javascripthtmlfilewebduplicates

how can i solve to handle the multiple html pages for e-learning website


i am making a e-learning website and its based on few coding langauges and im using pure HTML,CSS,JS no any other framework and all , due to newbie so i ahve a question regarding that lets say there an C langauge Page and if we take another example c has 20 concepts(ex) so will i have to make 20html pages and its css for all 20 concepts ? even if i input all the content of C in one page it will be chances of more loading of the page for user so please help anyone

im trying to make all the content in one html page so i can just manage 1html and css file and i was trying to do make 20 html page as i can make which is required for the content and lanaguages but it will take more time and i have to manage multiple of html and css file


Solution

  • Solution 1: If you want to use just HTML with CSS and little bit of javascript, you probably will need make 20 pages (or what ever amount you need). CSS can be the same if styles is same on every page, just link css file in html file.

    Solution 2: If you have also some back-end like C# or Nodejs or any other, then you can use javascript to get correct page based on page id (or what ever you like) and load page data to same html page. In that case you may have one html ("template") page and css styles for it.

    Solution 3: Better to use some modern framework that do everything that you will need to create in solution 2 by itself so you won't need to manually load and format data. Angular or any other framework will do it automagically with little effort from your side. So you would concentrate on content creation and not on loading and fitting content to page.

    Conclusion: IMHO solution 1 and 3 are the best. Either you create bunch of simple html pages (like in web-sites of 90's) or use some modern tools. Creating new "framework" for itself like in Solution 2 is pointless and time consuming.