A CSS selector is a pattern that identifies DOM elements by tag name, class, ID, or a combination of these. D3 passes selector strings to d3.select() and d3.selectAll() before modifying the selected elements. section 2.3 section 2.7
Use selectors to target elements for visualization work:
- Use d3.select() for the first matching element and d3.selectAll() for every matching element; commas can group selector alternatives. section 2.3
Extracting tables from a web page
A browser script uses document.querySelectorAll(".wikitable.sortable") to collect matching HTML tables, then loops through their rows to extract painting data. The selector was chosen by inspecting the page markup for a unique common pattern. section 14.1







