---
title: Visual Question Answering
type: templates
category: Computer Vision
cat: computer-vision
order: 143
meta_title: Visual Question Answering Data Labeling Template
meta_description: Template for performing visual question answering data labeling tasks with Label Studio for your machine learning and data science projects.
---
Create a dataset with answered questions about images using this visual question answering template. In response to an image, annotators can provide free-text answers to a question and also label components of a question with relevant aspects.
## Interactive Template Preview
## Labeling Configuration
```html
```
## About the labeling configuration
All labeling configurations elements must be wrapped in [View](/tags/view.html) tags.
Use the [Image](/tags/image.html) object tag to display an image:
```xml
```
This image is stored in a Label Studio JSON-formatted file as a URL with the key "image".
Use the [Labels](/tags/labels.html) control tag to apply specific labels to the first question about the image, to classify specific parts of the question being asked about the image:
```xml
```
The `toName="q1"` argument is what makes these labels apply only to the text of the first question.
You can add a [header](/tags/header.html) to provide instructions to the annotator:
```xml
```
Add styling to the [View](/tags/view.html) tag to control the appearance of the question and answer blocks:
```xml
```
Use the [Header](/tags/header.html) tag to provide context about the text sample to annotators:
```xml
```
Use the [Text](/tags/text.html) object tag to display a question. This
```xml
```
This text sample is stored in a Label Studio JSON-formatted file with the key "q1".
Use the [Header](/tags/header.html) tag to provide context about the text sample to annotators:
```xml
```
Use the [TextArea](/tags/textarea.html) control tag to provide annotators a spot to answer question 1:
```xml
```
The text entered as part of this text box submission is stored in the exported Label Studio JSON under the name "answer1", and is associated with question 1 with the `toName` field. The text box only allows 1 submission, and is only 1 row long when displayed on the labeling interface.
At the end of the question and answer block, close the [View](/tags/view.html) tag:
```xml
```
An entire section of question and answer prompts looks like the following:
```xml
```
## Related tags
- [Image](/tags/image.html)
- [Labels](/tags/labels.html)
- [Header](/tags/header.html)
- [TextArea](/tags/textarea.html)