Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using chrome developer tools to determine nth-of-type for a specific element?

I am trying to select a specific table on a webpage with many tables and I do not want to manually count the number of tables that come before it. Is it possible to use chrome developer tools to determine the number of that element?

For example, let's say the HTML looks like this:

<table></table> <table></table> <table></table>

When I hover my mouse over the 2nd table, is there a space in the Developer Tools that tells me it is the second table? Thanks.

like image 743
reidjs Avatar asked Sep 17 '25 08:09

reidjs


1 Answers

I figured out a way to do this from the "Elements" pane of the Developer Tools. Simply right click on the element of interest, select copy, and the select Copy Selector. Copy Selector Screenshot

What saves to the clipboard will lead to the element of interest.

like image 188
reidjs Avatar answered Sep 19 '25 02:09

reidjs