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

Tell us what’s happening:
I’ve tried every variation of this that seems possible. What gives?

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
    <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">

<!-- User Editable Region -->

    <h1>CSS Color Markers</h1>
    <div class="container"> </div>
    <div class="marker"></div>

<!-- User Editable Region -->

/* file: styles.css */
h1 {
  text-align: center;

Your browser information:

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

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

Link to the challenge:

Your div with the class of marker need to go between the > </div> in the line above

like this? it didnt work

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

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

1 Like

Close. Where is the closing div for the div that is between the > <?

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

I’ve tried this as well. No go

And now the marker div isn’t in the container div anymore.

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

I’ve tried this as well :frowning:

Now you have one single div with a class attribute that’s used and a class attribute that is ignored.

You have two meta elements, a title element, and a link element inside of the head element here…

Put the div element inside of the div element.

I apologize but I’m still new to coding. It says I should nest the new div for the marker within the class container. Both divs are supposed to be within the body element. Im sill confused about where I’m going wrong.

The marker div is not inside the container div.

To put one element inside another, you must put the entire second element after the opening tag and before the closing tag of the outer element.

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