---
id: 587d7fa7367417b2b2512bc6
title: Add Inline Styling to Elements
required:
- src: 'https://cdnjs.cloudflare.com/ajax/libs/d3/4.3.0/d3.min.js'
challengeType: 6
---
## Description
D3 lets you add inline CSS styles on dynamic elements with the style()
method.
The style()
method takes a comma-separated key-value pair as an argument. Here's an example to set the selection's text color to blue:
selection.style("color","blue");
## Instructions
Add the style()
method to the code in the editor to make all the displayed text have a font-family
of verdana
.
## Tests
```yml
tests:
- text: Your h2
elements should have a font-family
of verdana.
testString: assert($('h2').css('font-family') == 'verdana', 'Your h2
elements should have a font-family
of verdana.');
- text: Your code should use the style()
method.
testString: assert(code.match(/\.style/g), 'Your code should use the style()
method.');
```
## Challenge Seed
## Solution
```js
// solution required
```