Home > OS >  How to link html to html?
How to link html to html?

Time:10-10

I have written about 800 lines of code on a single HTML file and I am trying to separate segments of the code into different HTML files. However, I am struggling to link them back to the main file. And I have searched up how to do this on the internet and all that has come up is how to link the file through a hyperlink or link a HTML that takes you to a different page which isn't what I want. How can I go about this? Does HTML have a way of separating lines of code and linking them back to the main HTML file? I am very puzzled.

CodePudding user response:

Is it what you looking for? https://www.w3schools.com/howto/howto_html_include.asp Or do you want to use only html? You can also use languages like php or javascript frameworks.

CodePudding user response:

If i get it right , you want to divide your big html into small parts , and then include them in pages.

If you are using pure html,css and maybe js, you can migrate to gulp , it's pretty simple and easy to maintain tool , which will help you in development process.

The other tool is webpack,which is in my opinion not the best for beginner, but it's got bigger community, and bigger functionality.

However there are a lot of bundlers these days, you just should choose which one fits your requirements

CodePudding user response:

you should use reactjs, it simple and flexible and not too difficult to use

  •  Tags:  
  • html
  • Related