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

How to do this div element?

Your code so far

/* file: index.Ext.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 class="marker">
      <div class="marker">
      </div>
    </div>
  </body>
</html>
/* file: styles.Ext.css */
h1 {
  text-align: center;
}

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

Your mobile information:

I2011 - Android 13 - Android SDK 33

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

Link to the challenge:

hello!@Surajsolankit. i saw your you code, it is correct, but you forget to add the closing div tag for each marker. (except for container div class)

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

Hi there,

A div element consists of opening tag <div> and the closing tag </div>.

You are missing the closing tag </div> for both of your 2 div elements.

1 Like

hello @toan!how are you.how is the code?

Hi @Samuel-54 . Iā€™m all good.
You correctly pointed out the mistakes and is faster than me :smile:

oh! @toan thanks.But also your answer is correct. Because you solve it the error he get it.

1 Like