Initially, there is a filtration of elements in the DOM via browsers with respect to key selectors that are traversed until we get parents’ elements to determine the matches. Then the browser works on finding all the span elements present in the DOM and traverses them to parent elements to check whether they are matched to paragraph p elements. At last, when the browser finds all matches as parents, the matching process will be stopped and there will be black color applied to the content.
Leave a Reply