Question: Is there any way to have multiple distinct HTML pages contained within a single HTML file? For example, suppose I have a website with two pages:

```
Page 1 : click here for page 2

```

and

```
Page 2 : click here for page 1

```

Can I create a single HTML file that embeds simple static HTML for both pages but only displays one at a time? My actual pages are of course more complicated with images, tables and javascript to expand table rows. I would prefer to avoid too much script code. Thanks!

Answer: 
[Screen Rec](https://a.pomf.cat/kyyeea.webm)

You could use [Colker](https://www.reddit.com/r/web_design/comments/6ta3b1/a_single_html_file_which_uses_url_parameters_to/), which is built for this, but you'll have to remove the search box, and search feature code, because searching isn't compatible with the type of content you intend to use.

Page contents are stored in a `java-script array`, and the "`page`" (eg: ?`page=pagename`) URL parameter determines which page content to serve.
```html
<html>
<head>
<script>
function show(shown, hidden) {
  document.getElementById(shown).style.display='block';
  document.getElementById(hidden).style.display='none';
  return false;
}
</script>
</head>
<body>
    <a href="#" onclick="return show('Page1','Page2');">Show page 1</a>
    <a href="#" onclick="return show('Page2','Page1');">Show page 2</a>
  <div id="Page1">
    Content of page 1
  </div>

  <div id="Page2" style="display:none">
    Content of page 2
  </div>

</body>
</html>
```