# Image Pairing (H5P.ImagePair)

Two columns of pictures; the learner drags each one on the left onto its match on the right.

- Each item of `cards` is a pair: `image` with `imageAlt`, and `match` with `matchAlt`.
- `behaviour` is one setting, whether to offer Retry: `true` or `false`.

## Example

```json
{
  "type": "H5P.ImagePair",
  "params": {
    "taskDescription": "Match each river to its city.",
    "cards": [
      { "image": { "path": "danube.png" }, "imageAlt": "The Danube", "match": { "path": "budapest.png" }, "matchAlt": "Budapest" },
      { "image": { "path": "thames.png" }, "imageAlt": "The Thames", "match": { "path": "london.png" }, "matchAlt": "London" }
    ]
  }
}
```

<!-- Generated by `h5p-author schema --markdown` from the pinned pack. Do not edit by hand. -->

## Fields of H5P.ImagePair 1.4

The example is `type` and `params` alone, and `params` holds the fields below. A source also names its own `title`, `language`, `license` and `authors`, all four required: the build refuses a source that leaves out any of them. The author's name and the licence are the user's: ask for what they have not given. For a name they skip, write the one you know them by, or "Unknown"; for a licence they skip, `U`.

- `taskDescription` text = "Drag images from the left to match them with… — Task Description: A guide telling the user how to solve this task.
- `cards` list 2–100 of, required — Cards
  - `image` image file, required — Image
  - `imageAlt` text, required — Alternative text for Image: Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users.
  - `match` image file — Matching Image
  - `matchAlt` text — Alternative text for Matching Image: Describe what can be seen in the photo. The text is read by text-to-speech tools needed by visually impaired users.
- `behaviour` boolean = true — Behavioural settings

4 interface texts are left out: they come from the libraries' translations. `h5p-author schema H5P.ImagePair --all` lists them, for a source to set one.

<!-- End of the generated section. -->
