{
"$schema": "../../schemas/code-crispies-module-schema.json",
"id": "html-details-summary",
"title": "HTML Details & Summary",
"description": "Створюйте розгортувані секції без JavaScript",
"mode": "html",
"difficulty": "beginner",
"lessons": [
{
"id": "details-summary-basic",
"title": "Перший віджет",
"description": "Елемент <details> створює згортувану секцію. Елемент <summary> надає клікабельний заголовок. This content was hidden! HTML5 is the latest version of the HTML standard with new semantic elements and APIs. HTML5 is the latest version of the HTML standard with new semantic elements and APIs.
Натисніть на summary, щоб показати прихований вміст - без JavaScript!",
"task": "Створіть елемент <details> з:
1. Елементом <summary> з текстом Click to reveal
2. Елементом <p> з текстом This content was hidden!",
"previewHTML": "",
"previewBaseCSS": "body { font-family: system-ui; padding: 20px; } details { border: 1px solid #ddd; border-radius: 8px; padding: 15px; } summary { font-weight: 600; cursor: pointer; } summary:hover { color: #1976d2; } details p { margin-top: 15px; color: #666; }",
"sandboxCSS": "",
"initialCode": "",
"solution": "Click to reveal
\n
Це булевий атрибут - просто додайте open без значення.",
"task": "Додайте атрибут open до елемента <details>, щоб показати вміст за замовчуванням.",
"previewHTML": "",
"previewBaseCSS": "body { font-family: system-ui; padding: 20px; } details { border: 1px solid #ddd; border-radius: 8px; padding: 15px; background: #f9f9f9; } summary { font-weight: 600; cursor: pointer; } details p { margin-top: 15px; color: #666; }",
"sandboxCSS": "",
"initialCode": "FAQ: What is HTML5?
\n FAQ: What is HTML5?
\n
Порада: Введіть details*3>summary+p і натисніть Tab для розгортання Emmet. *3 створює 3 елементи, > вкладає всередину, + додає сусідні.",
"task": "Створіть секцію FAQ з:
1. Заголовком <h1> з текстом Frequently Asked Questions
2. Трьома елементами <details>, кожен з питанням у <summary> та відповіддю у <p>",
"previewHTML": "",
"previewBaseCSS": "body { font-family: system-ui; min-height: 100vh; background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); display: flex; flex-direction: column; justify-content: center; padding: 40px; margin: 0; box-sizing: border-box; } h1 { font-size: 2.5rem; color: #4a4a4a; text-align: center; margin: 0 0 30px 0; } details { background: white; border-radius: 12px; margin-bottom: 15px; padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); } summary { font-size: 1.3rem; font-weight: 600; color: #5c5c5c; cursor: pointer; list-style: none; } summary::before { content: '▸ '; color: #fcb69f; } details[open] summary::before { content: '▾ '; } details p { margin: 15px 0 0 0; color: #666; line-height: 1.6; }",
"sandboxCSS": "",
"initialCode": "",
"solution": "
HTML5 is the latest version of HTML with new semantic elements and APIs.
\nMany interactive features work with pure HTML5, no JavaScript required!
\nYes! Native HTML elements have built-in keyboard and screen reader support.
\n