Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to merge multiple HTML files into one master HTML file

Tags:

html

Let's say I have the following HTML files:

header.html

<html>
  <head>
    <link href="headerstyle.css" rel="stylesheet" type="text/css" />
  </head>
  <body>
    <div>Page Header</div>
  </body>
</html>

body.html

<html>
  <head>
    <script src="body.js"></script>
  </head>
  <body>
    <span>Page Body</span>
  </body>
</html>

I want to take these two files and make a master file that would look like this:

<html>
  <head>
    <link href="headerstyle.css" rel="stylesheet" type="text/css" />
    <script src="body.js"></script>
  </head>
  <body>
    <div>Page Header</div>
    <span>Page Body</span>
  </body>
</html>

How can I go about merging them into one HTML file in Java, maybe using Java (JSoup) or JQuery?

Thank you all in advance.

like image 432
Program-Me-Rev Avatar asked Nov 10 '15 08:11

Program-Me-Rev


1 Answers

You can do by <Frameset> Hope you get your needs

<frameset cols="50%,*">
  <frameset rows="50%,*">
      <frame src="frame_a.htm">
      <frame src="frame_c.htm">
  </frameset>
  <frame src="frame_b.htm">
</frameset>
like image 111
Gaurang Joshi Avatar answered Sep 25 '22 02:09

Gaurang Joshi