Bird
Raised Fist0
HTMLmarkup~20 mins

Navigation structure basics in HTML - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Navigation Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:00remaining
What is the main purpose of the
Choose the best description of the
AIt creates a container for all the main content on the page.
BIt defines a section of navigation links to help users move around the site.
CIt is used to add decorative images to the webpage header.
DIt is used to embed videos and multimedia content.
Attempts:
2 left
💡 Hint
Think about what helps users find their way on a website.
📝 Syntax
intermediate
1:30remaining
Which HTML snippet correctly creates a navigation bar with three links?
Select the valid HTML code that uses semantic elements for navigation.
A<nav><ul><li><a href="#home">Home</a></li><li><a href="#about">About</a></li><li><a href="#contact">Contact</a></li></ul></nav>
B<navigation><list><item><link href="#home">Home</link></item></list></navigation>
C<div><p><a href="#home">Home</a><a href="#about">About</a><a href="#contact">Contact</a></p></div>
D<nav><a>Home</a><a>About</a><a>Contact</a></nav>
Attempts:
2 left
💡 Hint
Remember to use semantic tags and proper nesting for lists and links.
5. You want to create a navigation bar that is accessible and responsive. Which combination of HTML and CSS practices is best?
hard
A. Use <header> only, no lists, and inline styles for positioning
B. Use <div> with <p> tags for links, no ARIA, and float for layout
C. Use <nav> with <span> for links, no semantic tags, and fixed widths
D. Use <nav> with a <ul> of links, add ARIA labels, and style with Flexbox for layout

Solution

  1. Step 1: Identify semantic HTML for navigation

    The <nav> element with a list (<ul>) of links is the correct semantic structure.
  2. Step 2: Accessibility and responsive layout

    Adding ARIA labels improves accessibility. Using Flexbox in CSS helps create a responsive layout that adapts to screen sizes.
  3. Final Answer:

    Use <nav> with a <ul> of links, add ARIA labels, and style with Flexbox for layout -> Option D
  4. Quick Check:

    Semantic + ARIA + Flexbox = best practice [OK]
Hint: Combine semantic tags, ARIA, and Flexbox for best navigation [OK]
Common Mistakes:
  • Using non-semantic tags for navigation
  • Ignoring accessibility with ARIA
  • Using outdated float instead of Flexbox
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard