<header id="header">
<nav id="nav" class="nav">
<a href="index.html">Home</a>
</nav>
</header>
html, body {
display: grid;
align-content: center;
height: 100%;
}
.nav {
display: flex;
padding: 25px;
}
.nav > a {
padding: 0 15px;
}
// Create a new anchor element
const $about = document.createElement('a')
$about.href = 'about.html'
$about.textContent = 'About'
// Append the new anchor to the Nav
const $nav = document.getElementById('nav')
$nav.appendChild($about)
This Pen doesn't use any external JavaScript resources.