Question 1
Consider the below HTML document.
index.html:
<table id ="table_id"> <tr> <th>Name</th> <th>Standard</th> </tr>
<tr> <td id = "cell_id_1">Pihu</td> <td id = "cell_id_2">BA</td> </tr> <tr> <td id = "cell_id_3">Sonali</td> <td id = "cell_id_4">BCA</td> </tr></table>
<script>document.getElementById("table_id").addEventListener("click", () =>console.log("Table Clicked !!"), true);
document.getElementById("cell_id_1").addEventListener("click", () =>console.log("Cell Clicked !!"), true);</script>Suppose you open the “index.html” file in a browser, and click on the table cell with the text “Pihu”. Which of the following shows the correct sequence of output?
Cell Clicked !!
Table Clicked !!Table Clicked !!
Cell Clicked !!Cell Clicked !!
Table Clicked !!
