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: 
[Twine](https://twinery.org/) is an open-source tool for telling interactive, nonlinear stories. 
It generates a single html with multiples pages.
Maybe it is not the right tool for you but it could be useful for someone else looking for something similar.
going along with @binz-nakama, here's an update on his jsfiddle with a very small amount of javascript. also incoporates this [very good article on css navigation](http://css-snippets.com/simple-horizontal-navigation/ "very good article") 

[update on the jsfiddle](https://jsfiddle.net/seanmcdon/x2ybsvz6/ "jsfiddle")

```
Array.from(document.querySelectorAll("a"))
.map(x => x.addEventListener("click", 
  function(e){
    Array.from(document.querySelectorAll("a"))
    .map(x => x.classList.remove("active"));
    e.target.classList.add("active");    
  }
));

```