# Chained Target

We are used to nested querying in JavaScript e.g. `document.querySelector("#foo").querySelector("#bar")`. Similarly you can chain targets in Puppetry.

Let's say we have a target `LEVEL_1`:

![Defining parent target](https://3461068122-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdyKJ-zzeS2hB7DF04J%2F-LuI0cO52QNTtp2SkV7k%2F-LuI0iRRsMTlJP78TeLI%2Fchained1.png?alt=media\&token=844db365-b8b1-43cb-af25-e97244de1ffa)

If we want to have a child target we use **Options** link

![Defining local target](https://3461068122-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdyKJ-zzeS2hB7DF04J%2F-LuI0cO52QNTtp2SkV7k%2F-LuI0kJLmPhNdsxMvNx5%2Fchained2.png?alt=media\&token=3055af09-a437-404e-81bb-ea54f12f6185)

We set **Parent target** to `LEVEL_1` and **Parent type** to `generic element`.

![Chained target](https://3461068122-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdyKJ-zzeS2hB7DF04J%2F-LuI0cO52QNTtp2SkV7k%2F-LuI0mFGw7OPv7TyG41k%2Fchained3.png?alt=media\&token=2bbb2c72-1d29-4808-80e7-1a8dff295f08)

As soon as the `LEVEL_2` target defined we can address it as any simple target.
