importance: 5

---

# Get the attribute

Write the code to select the element with `data-widget-name` attribute from the document and to read its value.

```html run
<!DOCTYPE html>
<html>
<body>

  <div data-widget-name="menu">Choose the genre</div>

  <script>
    /* your code */
  </script>
</body>
</html>
```
