I need help around attribute selectors

So, i was going through the HTML/CSS course and I made it to the Use Attribute Selectors to Style Elements course. I read the instructions and followed them by adding an Attribute Selector that selects all elements with attributes that have a value of “checkbox”, and using it to give it a margin of: “margin: 10px 0px 15px 0px;”. The end result looked like this: http://prntscr.com/lu1sde and the code looked like this:

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
  .red-text {
    color: red;

  [type= 'checkbox']
    margin: 10px 0px 15px 0px;

  h2 {
    font-family: Lobster, monospace;

  p {
    font-size: 16px;
    font-family: monospace;

  .thick-green-border {
    border-color: green;
    border-width: 10px;
    border-style: solid;
    border-radius: 50%;

  .smaller-image {
    width: 100px;

  .silver-background {
    background-color: silver;

<h2 class="red-text">CatPhotoApp</h2>
  <p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>
  <a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
  <div class="silver-background">
    <p>Things cats love:</p>
      <li>cat nip</li>
      <li>laser pointers</li>
    <p>Top 3 things cats hate:</p>
      <li>flea treatment</li>
      <li>other cats</li>
  <form action="/submit-cat-photo" id="cat-photo-form">
    <label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
    <label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
    <label><input type="checkbox" name="personality" checked> Loving</label>
    <label><input type="checkbox" name="personality"> Lazy</label>
    <label><input type="checkbox" name="personality"> Energetic</label><br>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>

When i went to run the test and finish the challenge it gave me an error saying this:
The type attribute selector should be used to select the checkboxes. I thought it was a mistake, so i did it again but it showed the same error message.
Maybe some of you will see the mistake that i made. Anyways thanks in advance!

Remove the space in your selector.

1 Like

Makes sence. Thanks for your help!

Glad I could help. Happy coding.

1 Like