--- id: bad87eee1348bd9aede07836 title: Set the id of an Element challengeType: 0 videoUrl: 'https://scrimba.com/c/cN6MEc2' --- ## Description
In addition to classes, each HTML element can also have an id attribute. There are several benefits to using id attributes: You can use an id to style a single element and later you'll learn that you can use them to select and modify specific elements with JavaScript. id attributes should be unique. Browsers won't enforce this, but it is a widely agreed upon best practice. So please don't give more than one element the same id attribute. Here's an example of how you give your h2 element the id of cat-photo-app: <h2 id="cat-photo-app">
## Instructions
Give your form element the id cat-photo-form.
## Tests
```yml tests: - text: Give your form element the id of cat-photo-form. testString: assert($("form").attr("id") === "cat-photo-form", 'Give your form element the id of cat-photo-form.'); ```
## Challenge Seed
```html

CatPhotoApp

Click here to view more cat photos.

A cute orange cat lying on its back.

Things cats love:

  • cat nip
  • laser pointers
  • lasagna

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats


```
## Solution
```js // solution required ```