Add Inline Styling to Elements.,

Add Inline Styling to Elements.,
0

#1

Tell us what’s happening:

Why this doesn’t pass?

Your code so far


<body>
  <script>
    const dataset = [12, 31, 22, 17, 25, 18, 29, 14, 9];
    
    d3.select("body").selectAll("h2")
      .data(dataset)
      .enter()
      .append("h2")
      .text((d) => (d + " USD"))
      // Add your code below this line
      
.style("height", (d) => d+"px");      
      // Add your code above this line
  </script>
</body>

Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/data-visualization/data-visualization-with-d3/add-inline-styling-to-elements/


#2

Because you shouldnt add heights.

You should change their font-family.

Add the style() method to the code in the editor to make all the displayed text have a font-family of verdana .


#3

And how can I do it?


#4

you can use :
.style(“font-family”,“verdana”) to do that


#5

Thank you for help.:slightly_smiling_face: