Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Expandable List | Text Boxes
Test UI Features
course content

Зміст курсу

Test UI Features

Test UI Features

1. Buttons
2. ContentDev Tools
3. Image Tools
4. Links
5. Other
7. Tables
8. Developers

book
Expandable List

Element

Source Code

html

index.html

copy

README

Expandable accordion component. It allows users to reveal or hide content inside collapsible sections.

How to Use the Component

Create the container for the accordion items.

Each accordion item consists of:

  • A hidden checkbox (input[type="checkbox"]): controls expansion;
  • A label (label): acts as the clickable trigger;
  • A content container (div.content): holds the expandable content.

Creating an Accordion Item

Each item must follow this structure:

Key points to remember:

  • The <input> must have a unique id;
  • The <label> must have a matching for attribute that references the id of the checkbox;
  • The .content section contains the content that will be shown or hidden when the label is clicked.

Adding Content Inside an Accordion Item

If your content requires a list of items, use <ul> and <li> inside .content:

If your content is just text (not a list), use <p> inside .content:

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 6. Розділ 11
We're sorry to hear that something went wrong. What happened?
some-alt