For example if I have html like this:
<div id="id">
<div class="class1">
<div class="class2" name="name1"></div>
<div class="class2" name="name2"></div>
<div class="class2" name="name3"></div>
</div>
</div>
And I have many divs with diffrent id values. It is possible to find and choose element by name attribute’s value when having <div id="id"> as a start point?
Yes, of course, using the “attribute equals” selector, e.g.:
will find all divs with
name="foo"that are descendents (direct or otherwise) of the div with IDid.