Merge two HTML files
I would like to merge two html files without losing the formatting of each.  Is that possible?
July 24th, 2015 11:29am

If you concatenate them the browser will merge them where possible. TO do this manually is very tricky.  Yoou need to have very good skills with HTML.  There is no simple way to do this.

Example of two pages concatenated:

<html>
<head>
<meta name="GENERATOR" content="SAPIEN Technologies PrimalScript 2015">
<title>Document Title</title>
<style type="text/css">
	td {
	border-collapse:collapse;
	border-style: solid;
	}
</style>
</head>
<body>
<table>
<tr><td>one</td><td>two</td><td>three</td></tr>
<tr><td>one</td><td>two</td><td>three</td></tr>
<tr><td>one</td><td>tw0</td><td>three</td></tr>
</table>
</body>
</html>

<html>
<head>
<meta name="GENERATOR" content="SAPIEN Technologies PrimalScript 2015">
<title>Document Title</title>
<style type="text/css">
	td {
	border-collapse:collapse;
	border-style: solid;
	}
</style>
</head>
<body>
<table>
<tr><td>XXXX</td><td>YYYYYYYYYYY</td><td>ZZZZZZZZZ</td></tr>
<tr><td>XXXX</td><td>YYYYYYYYYYY</td><td>ZZZZZZZZZ</td></tr>
<tr><td>XXXX</td><td>tYYYYYYYYYY</td><td>ZZZZZZZZZ</td></tr>
</table>
</body>
</html>

Save to one file and open to see that it works but more complex pages may behave badly.

Free Windows Admin Tool Kit Click here and download it now
July 24th, 2015 12:20pm

Thanks for your input.
July 28th, 2015 8:19am

You are welcome.  Note that you can find DOM scriptable editors that can allow you to decompose and combine HTML documents.

Free Windows Admin Tool Kit Click here and download it now
July 28th, 2015 8:23am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics