We can access local webpages like trail.html by adding / and the file name, just like with local images.

<html>
<head>
<style>
/* Make all links look active even when href isn't set. We do this so we can set the onclick attribute instead. */
a { color: #0000EE; text-decoration: underline; cursor: pointer; }
a:visited { color: #551A8B; text-decoration: underline; cursor: pointer; }
</style>
</head>
<body>
<div id="content">
</div>
<script>
/* Lukas quickly coded the stuff below. Use at your own risk....
//
// This script fakes links to local webpages by replacing instances of href="/pageName.html" with onclick="load(pageName);"
// The load(pageName) function replaces content from one webpage with content from another.
//
// OG pages copied from Course Builder
// Example: { 'index.html': '<h1>Hello, World!</h1>' }
*/
let pageBodies = {
'index.html': '<h5>History of the American Pioneers</h5> <a href="/trail.html">Follow the <strong>trail</strong> by clicking here!</a>',

'trail.html': '<a href="/index.html">Back</a> <h3>Oregon Trail</h3> <p>The Oregon Trail is a 2,170-mile historic East–West, large-wheeled wagon route and emigrant trail in the United States that connected the Missouri River to valleys in Oregon.</p>',
};
/*
// Create a pathToOnClickMapping object where keys are href absolute paths and values are onclick attributes replacing the page's body
// Example: { 'href="/trail.html"': 'load(\'trail.html\');' }
*/
let pathToOnClickMapping = {};
Object.keys(pageBodies).forEach((key) => {
pathToOnClickMapping['href="/' + key + '"'] = 'onclick="load(\'' + key + '\');"';
});
let regex = new RegExp(Object.keys(pathToOnClickMapping).join("|"), "gi");
/*
// Create a pagesWithAbsolutePathsReplaced object that stores webpage bodies with absolute paths replaced with onclick=load(pageName)
*/
let pagesWithAbsolutePathsReplaced = {};
Object.keys(pageBodies).forEach((key) => {
pagesWithAbsolutePathsReplaced[key] = pageBodies[key].replace(regex, function(matched) {
return pathToOnClickMapping[matched];
});
});
/*
// Replace content of webpage with page from pagesWithAbsolutePathsReplaced
*/
function load(pageName) {
document.getElementById('content').innerHTML = pagesWithAbsolutePathsReplaced[pageName];
};
load('index.html');
</script>
</body>
</html>]]>

Make sure to pick /, followed by trail.html.