AgainColours
The profile

5 of 11

The menu

This lesson is closed. Finish the one before it. Do the practice. Pass the assessment. Then this one opens.

Go to The header

Back to the lesson. Three tries are used. Read this again, then try the code.

You finished. The lesson is open again.

Home, About, Skills, Contact. A background colour. Padding. Borders between or around menu items. Appropriate text colour. Margins between the items.
The project brief

Look here

The clay outline is the part this lesson is about.

In plain words

The menu is a nav. Inside it, four links: Home, About, Skills, Contact. This profile is one page, so each link jumps to a spot on the page. A jump looks like href="#about". The spot it jumps to has id="about". The # and the id must match.

1 of 3

The labels

<nav id="menu">
  <a href="#top">Home</a>
  <a href="#about">About</a>
  <a href="#skills">Skills</a>
  <a href="#contact">Contact</a>
</nav>

The paint

nav {
  background: #f4ede6;
  padding: 12px;
  text-align: center;
}

nav a {
  display: inline-block;
  color: #1a1712;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid #e4d9ce;
  padding: 10px 14px;
  margin: 6px;
}

Line by line

  1. <nav>The menu. One nav on the page, so the CSS says nav and means it.
  2. href="#about"A jump on this same page. #about finds the label that has id="about". Home uses #top, which is the header.
  3. background: #f4ede6;Ghost, a light warm bar. It must not be the same dark colour as the header, or the two bands merge.
  4. padding: 12px;Space inside the bar, around the items.
  5. border: 1px solid #e4d9ce;A border around each item. The brief allows borders between or around. Around is the clearer one.
  6. margin: 6px;Space outside each item, so the boxes do not touch. Padding is inside. Margin is outside.
  7. color: #1a1712;Ink text on the light boxes. Appropriate means readable.
  8. text-decoration: none;Removes the underline. The border is what shows that the word can be tapped.

The next lesson opens after you practice and pass the assessment.

Practice

These look like buttons, and they go nowhere. Turn them into links.

Assessment

The lesson is closed. Pick one answer each, then mark it. A wrong answer tells you why, what to do, and what to remember.

On this one-page profile, what does href="#skills" do?
The brief shows boxes that look like buttons. What should the HTML be?