Learn HTML
This is the main article.
Description: Create a navigation menu with the links Home, About, Services and Contact, shown in one line.
Hint:
ul, li and a inside a nav tag.<nav>
<ul class="menu">
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="services.html">Services</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
<style>
.menu { list-style: none; padding: 0; }
.menu li { display: inline-block; margin-right: 15px; }
</style>
Output in the browser:
nav tag tells that this block has navigation links.list-style: none removes the bullets, and display: inline-block puts the items in a row.Read HTML Semantic Elements.
Description: Create a web page layout with a header, a navigation bar, a main area with an article and a sidebar, and a footer.
Hint:
header, nav, main, article, aside and footer.<!DOCTYPE html>
<html lang="en">
<head>
<title>My Blog</title>
</head>
<body>
<header>
<h1>My Blog</h1>
</header>
<nav>
<a href="/">Home</a> | <a href="/about">About</a>
</nav>
<main>
<article>
<h2>Learn HTML</h2>
<p>This is the main article.</p>
</article>
<aside>
<h3>Related links</h3>
<p>Links go here.</p>
</aside>
</main>
<footer>
<p>© 2025 My Blog</p>
</footer>
</body>
</html>
Output in the browser:
This is the main article.
aside next to the article.Read HTML Semantic Elements. A div based version is in Basic HTML page layout using div tags.