You are on page 1of 2

<!

DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="style.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body id="page-top">
<nav class="nav">
<a class="nav_link" href="#section-1">Section 1</a>
<a class="nav_link" href="#section-2">Section 2</a>
<a class="nav_link" href="#section-3">Section 3</a>
<a class="nav_link" href="#section-4">Section 4</a>
</nav>
<main class="main"> <h1>Mate academy</h1>
<section class="section" id="section-1">
<h2>Section 1</h2>
<a href="#page-top">Go to top</a>
</section>
<section class="section" id="section-2">
<h2>Section 2</h2>
<a href="#page-top">Go to top</a>
</section>
<section class="section" id="section-3">
<h2>Section 3</h2>
<a href="#page-top">Go to top</a>
</section>
<section class="section" id="section-4">
<h2>Section 4</h2>
<a href="#page-top">Go to top</a>
</section>
</main>
</body>
</html>

html {
font-family: Arial, Helvetica, sans-serif;
scroll-behavior: smooth;
}
body {
margin: 0;
}
.nav {
display: flex;
justify-content: space-between;
padding: 0 20px;
background-color: #222;
}
.nav_link {
line-height: 40px;
text-decoration: none;
color: #fff;
}
.nav_link:hover {
color: #888;
}
.main {
padding: 0 20px;
}
.section {
height: 300px;
border: 5px solid #005767;
background-color: #ffd700;
padding: 0 5px;
margin: 10px 0;
}

You might also like