Learn CSS Colors by Building a Set of Colored Markers - Step 14

Tell us what’s happening:

I have tried adding the div class but it won’t go through. What could be the problem?

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Colored Markers</title>
    <link rel="stylesheet" href="styles.css">
  </head>
  <body>
    <h1>CSS Color Markers</h1>

<!-- User Editable Region -->

    <div class="container"
      <div class="marker"</div>
      <div class="marker"</div>
      <div class="marker">
      </div>
    </div>

<!-- User Editable Region -->

  </body>
</html>
/* file: styles.css */
h1 {
  text-align: center;
}

.marker {
  width: 200px;
  height: 25px;
  background-color: red;
  margin: auto;
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.5249.168 Safari/537.36

Challenge Information:

Learn CSS Colors by Building a Set of Colored Markers - Step 14

Looks like you are missing and angled bracket here >

I have added it but still it won’t work

<div class="marker"
<div class="marker"

You are still missing the angled brackets here. > (for the opening tags)

Please check your work.

I have tried that but it’s not working

div class="marker"
div class="marker"
div class="marker"

Hi,
Can you add your updated code?
As mentioned before you have to make sure your div tag is closed.

<div class="container"
<div class="marker"
<div class="marker"
<div class="marker"

I have already added the closing tags

A div element with a class looks like this:
<div class="style"></div>

Please take a closer look and see if your divs are written in the same structure.

1 Like

Right now out of all these, the fourth div is written correctly.

1 Like

I got it. Thank you so much.

2 Likes