The ID of an Element

The ID of an Element
0.0 0

#1

In addition to classes, each HTML element can also have an id attribute.

There are several benefits to using id attributes, and you’ll learn more about them once you start using jQuery.

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:

Give your form element the id cat-photo-form.


#2

What’s the question?


#3

Worked it out. Was supposed to put the ID in the after the first entry in form


#4

The test says I did it correctly, but I don’t see any change to the web page after completing this task. What is the purpose?

thanks for any replies


#5

What challenge are you working on?


#6

It was lesson 40 adding an id to the form. The next lesson explains that you have to add an attribute in the style, so that explains it.

Thanks!


#7

Sounds like you have it figured out now. FYI - The challenges do not have numbers. They do have names. The number you see is your total brownie points.