# Target

{% dynamic setvar source_file "src/main/java/com/google/devtools/build/lib/starlarkbuildapi/core/TransitiveInfoCollectionApi.java" %} {% dynamic setvar version "8.0.0" %} {% dynamic setvar original_path "/rules/lib/builtins/Target" %} {% include "_buttons.html" %} The BUILD target for a dependency. Appears in the fields of `ctx.attr` corresponding to dependency attributes (`label` or `label_list`). Has the following fields:

- ### label

  `Label Target.label`
  The identifier of the target.

- ### Providers

  The providers of a rule target can be accessed by type using index notation (`target[DefaultInfo]`). The presence of providers can be checked using the `in` operator (`SomeInfo in target`).