When we create our page HTML, this is made up of a set of elements HTML which achieve the graphic representation of the page.
For example, we can insert an image and a layer using the following code:
<div> <img src="image.gif" width="100" height="200" alt="image"/> </div>
If, later on, we want to use some scripting language, like JavaScript and we need to modify some of the elements of the page, such as the layer and the image from before, we must uniquely identify them.
To uniquely identify an element HTML we must use the attribute id. The value to be assigned to the id attribute must be a unique value.
So our code from before would look like this:
<div id="mylayer"> <img id="image1" src="image.gif" width="100" height="200" alt="image" /> </div>
As you can see in the code, the id has been assigned to elements DIV e IMG.
