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

Tell us what’s happening:
Describe your issue in detail here.

  please i need assistance, i don't really understand this task.. pls help with a detailed explanation
/* 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">
  <h1>CSS Color Markers</h1>
  <div class="container">
    <div class="marker">
    <div class="marker">
    <div class="marker">
/* file: styles.css */
h1 {
text-align: center;

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

  **Your browser information:**

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

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

Link to the challenge:

you are given the above code and you are being asked to a add a new class to it.

In the above code we see there are 3 div elements
Each div element currently has a class attribute and its value is ‘marker’
In HTML, you can assign more than one class to an element.

Think of a ‘class’ as an actual class like in a school for eg.
A student can belong to more than one class right? English/Math/Science etc.
In HTML is the same, an element can belong to more than one class.

To tell the browser that an element belongs to a class, or multiple classes you must add a ‘class’ attribute (if it is not already there). And give that class attribute the value of the name of the classes that this element belongs to.

In this case the div element belongs to a class called ‘marker’.
And the exercise wants you to add another specific class (in addition to the marker class)

So just add the new class next to the word marker, but leave a single space in between.
(then repeat for each div requested in the exercise) The new class is called “one”

1 Like

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