CSS CSS Basics Understanding Values and Units Em and Rem Units

EM vs REM Code challenge

Can someone please check my code and how I'm approaching the problem below? I'm not sure I'm understanding this at all.

/* Complete the challenge by writing CSS below */

html {
  font-size: 16px; /*Quiz says h2 has a parent values of 16px
  ...Which is this value*/

header {
  font-size: 1.5em;

.heading {
  font-size: 5rem;
h2 {
  3em; /*1em equals 16px. 48/16 equals 3. Shouldn't it be 3em?
  Or am I missing something? */
<!DOCTYPE html>
<html lang="en">
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Developer Diane: Resume</title>
  <link rel="stylesheet" href="page.css">
  <link rel="stylesheet" href="style.css">
      <div id="header-box">
        <h1 class="heading">Developer Diane: Resume</h1>
          <p>website: developerdiane.com</p>
          <p>email: diane@developerdiane.com</p>
        <img src="developer-diane.jpg" alt="Developer Diane coding on her laptop.">
    <section id="education">
          <h3><a href="https://teamtreehouse.com">Treehouse</a></h3>
          <p>Front End <em>Web Development</em> Techdegree</p>
          <p class="date special">Graduated January 2020</p>
    <section id="experience">
          <h3>Super Web Design Shop</h3>
          <p>Junior Developer</p>
          <p class="date special">February 2020-present</p>
          <h3>Pretty Good Websites, Inc.</h3>
          <p>Web Development Intern</p>
          <p class="date">July 2019-January 2020</p>
      <ul id="skills-list">
        <li class="top-skill">HTML</li>
        <li class="top-skill" id="proud">JavaScript</li>
        <li class="top-skill">Mobile Web Development</li>
      <h2>Awards and Achievements</h2>
        <li>Dev Ninja Award, November 2020</li>
        <li>Developer of the Month, October 2019</li>
        <li>Achieved rating of 6 kyu on <a href="https://www.codewars.com/">Codewars</a></li>
        <li>Certified Accessibility Specialist</li>
    <footer>©2020 Developer Diane.</footer>

1 Answer

Jason Anders
Jason Anders
Treehouse Moderator 145,299 Points

HI Rachel Masselle

Yes. You are correct in that the em value needs to be 3. However, you don't have what needs to be 3 in the rule. The challenge asks to make it that font-size, but you just have the value and no target. Have a look at the other rules in the challenge and then edit yours to match the structure.

Keep Coding! :) :dizzy:

Oh my goodness! I didn't even notice I had left that part out. Thank you so much for pointing that out, Jason! I appreciate you taking the time to look over my code. It, of course, works now that I included the target. Thank you again!!