Build a Simple Navigation Bar

Objectives

By the end of this lesson, students will be able to:

Materials & Tools

Lesson Outline

1. Introduction (10 minutes)

2. Direct Instruction (15 minutes)

HTML Structure:

Explain the semantic use of the <nav> element. Demonstrate building a simple list using <ul> and <li>, and how each list item can contain an anchor (<a>) for links.

Example Code:

<nav>
  <ul>
    <li><a href="#home">Home</a></li>
    <li><a href="#about">About</a></li>
    <li><a href="#services">Services</a></li>
    <li><a href="#contact">Contact</a></li>
  </ul>
</nav>
    

CSS Styling:

We have introduced basic styling concepts: colors, fonts, padding, margins, and layout (e.g., horizontal alignment using display: inline-block or flexbox). Walk through a simple CSS example to style the navigation bar.

Example CSS:

nav ul {
  list-style: none;
  background: #333;
  display: flex;
  padding: 0;
  margin: 0;
}
nav ul li {
  flex: 1;
}
nav ul li a {
  display: block;
  padding: 14px 20px;
  color: white;
  text-align: center;
  text-decoration: none;
}
nav ul li a:hover {
  background: #555;
}
    

3. Mr. Cusack will talk about resource you can use.

4. Complete the assignment.

5. Assessment & Wrap-Up (5 minutes)

Additional Resources