Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

css select all links in div

single direct child example:
document.querySelector("div > a") // returns the <a> link

all children example:
document.querySelectorAll("div a") // returns NodeList[a, etc...]
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #css #select #links #div
ADD COMMENT
Topic
Name
4+5 =