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

I’m not sure i understand the instruction. Every time I add the closing div, It doesn’t expect it. but also tells me I need to add one. It also mentions in adding 2 new ‘div’, how would i add it?

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>
   <div class="container" <div class="marker"</div> <div class="marker"</div> </div>
      <div class="marker">
      </div>
    </div>
  </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/107.0.0.0 Safari/537.36

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

Link to the challenge:

Are you opening this div tag properly?

I would assume so, what would be the correct form?

Notice how are we opening and closing the h1 tag.

Well I opened/closed it like

tag, However it appears on the web page and still accepting. I still don’t what I’m doing wrong

The syntax for div tag is <div> </div>
You are missing > while starting div tag.

Your new div elements should be within the div with the class container - what does that mean?

The browser compensates for syntax errors.
The fCC test will not do that. You must write correct code.

This is a div opening tag
<div>
This is a div opening tag with a class attribute
<div class="something">

In both cases, the div opening tag is surrounded by angled brackets < and >

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.