# Accordion (H5P.Accordion)

Text in panels that open on a click, for reference material a learner looks up. Not scored.

- Each item of `panels` has a plain `title` and its `content`, sub-content of H5P.AdvancedText: `{ "library": "H5P.AdvancedText", "params": { "text": "…" } }`.

## Example

```json
{
  "type": "H5P.Accordion",
  "params": {
    "panels": [
      { "title": "Source", "content": { "library": "H5P.AdvancedText", "params": { "text": "Where a river begins." } } },
      { "title": "Mouth", "content": { "library": "H5P.AdvancedText", "params": { "text": "Where a river ends, in a sea or a lake." } } }
    ]
  }
}
```

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

## Fields of H5P.Accordion 1.0

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`.

- `panels` list 1–100 of, required — Panels
  - `title` text, required — Title
  - `content` sub-content: H5P.AdvancedText, required — Content type
- `hTag` one of "h2" | "h3" | "h4" = "h2" — H tags for labels (does not affect the size of the label): The h tag used on the labels. Normally H2 but if this belongs under an H2 heading use H3. Does not affect the size of the labels, only use…

It has no interface texts of its own.

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