HTML. Div and list

Good afternoon,

I am trying to do lesson lesson 11 in HTML, but Im stuck. Below are the instructions and what I did can someone help?I also want to know if I did the list the right way.
First, we will enclose all the elements between <body>...</body> in a div element with a class attribute of “container”.

<div class="container">

All the HTML elements you added in previous exercises should be inside the opening <div class="container">:

the navbar h2
the navbar ul
the company heading h1
the tagline h3
the paragraph
the video
Make sure the closing tag is at least one line below the closing tag.

Click Run. Notice that the elements have shifted in the web browser. We will fix this effect later on.
Next, we will enclose the navbar h2 and ul in another div and give it a class attribute of “nav”. You can use the code below as a guide:

<div class="nav">
    <li>sign up</li>
    <li>search bikes</li>
    <li>reserve a bike</li>
    <li>about us</li>

Click Run.

Notice that the navbar section now has a yellow background.

My work:

<!DOCTYPE html>
  <title>Ollie Bike Sharing</title>
  <meta charset="utf-8"/>
  <link rel="stylesheet" type="text/css" href="main.css">
 <div class="container"><h2>Ollie</h2>
    <li>sign up</li>
    <li>search bikes</li>
    <li>reserve a bike</li>
    <li>about us</li>
  <h1>Ollie Bike Sharing</h1>
  <h3>Share Your Pedals with the World.</h3>
  <p>Need a set of wheels while you're in town? Use Ollie to pair your perfect vacation with a stylish, affordable bike rental. Here is a <a href="cities.html">list</a> of cities where you can find us.</p>
  <video width="320" height="240" controls>
    <source src="" type="video/mp4">

you need to add another div: <div class="nav"> </div> which you will put around your navigation menu (ul)

1 Like

4 posts were split to a new topic: Question about Bootstrap

i dont get it…wow im dumb… lol

i have the same problem as this guy and did what you said but it still doesn’t work?

Paste in your code and error

It work now just had to refresh page and it worked. Thanks anyway! Loving
the courses!

1 Like