Collection of free HTML <details> & <summary> with CSS code examples

Discover a collection of free HTML details & summary snippets with CSS code examples to enhance interactivity and style on your website.

Latest Transactions

Author:
Håvard Brynjulfsen | March 30, 2021
Made with:
HTML / CSS (SCSS)

About a code

Concept component displaying your latest money transactions.

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-

Animate Accordions with WAAPI

Author:
Chris Coyier | March 2, 2021
Made with:
HTML / CSS (SCSS) / JS

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-

<details> and <summary> with animated arrow (no JS)

Author:
Moritz Gießmann | February 25, 2021
Made with:
HTML / CSS (SCSS)

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-

Details Modal

Author:
Niels Voogt | January 10, 2021
Made with:
HTML / CSS (SCSS)

About a code

By nesting a modal inside a details element it is automaticly shown when the details is opened. And by nesting the overlay inside the summary element, we can use that to trigger a close.

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-

Native HTML Details Element Styled via CSS

Author:
Nicolás J Engler | January 10, 2021
Made with:
HTML / CSS (SCSS)

About a code

Rebound shot from Dribbble to implement an accordion-like element using only the details/summary native HTML element and CSS.

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-

Pure CSS Details Interaction

Author:
Bar Hatsor | September 24, 2020
Made with:
HTML / CSS (SCSS)

About a code

Using HTML <details> to power an SVG menu toggle.

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-

Details and Summary

Author:
Pedro Renato Rodrigues de Sousa | September 23, 2020
Made with:
HTML / CSS (SCSS) / JS

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-

Details Element for Help Text

Author:
Niels Voogt | June 6, 2020
Made with:
HTML / CSS (SCSS)

About a code

You can use the details element to provide additional information on fields that new users might need help with.

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-

TreeView Details/Summary

Author:
johnbarnitz | June 5, 2020
Made with:
HTML / CSS

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
no
Dependencies:
ionicons.css

Pure CSS Dropdown Menu

Author:
Garet McKinley | August 1, 2019
Made with:
HTML / CSS

About a code

Pure CSS dropdown menu with details and summary.

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
no
Dependencies:
-

HTML Only Accordion

Author:
Frederick Allen | July 3, 2019
Made with:
HTML / CSS

About a code

Exploring styling the HTML details and summary tags to create functional accordion without any JavaScript.

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-

Details Element

Author:
Niels Voogt | May 24, 2019
Made with:
HTML / CSS (SCSS)

About a code

A details HTML element with a custom arrow in SVG, no JavaScript.

Compatible browsers:
Chrome, Firefox, Opera, Safari
Responsive:
no
Dependencies:
-

Animated Details Element

Author:
Mert Cukuren | March 17, 2019
Made with:
HTML / CSS (SCSS)

Compatible browsers:
Chrome, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-

Unit Testing Results Panel

Author:
Tony Banik | February 13, 2019
Made with:
HTML (Pug) / CSS (SCSS) / JS

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
font-awesome.css

Details Elements Example

Author:
James Steinbach | October 10, 2018
Made with:
HTML / CSS (SCSS)

Compatible browsers:
Chrome, Firefox, Opera, Safari
Responsive:
yes
Dependencies:
-
HTML5 Details & Summary

HTML5 Details & Summary

Author:
Jenning | August 16, 2018
Made with:
HTML (Pug) / CSS (Sass)

About a code

details works like an accordian - but without the need for script, supported by most major browsers (except IE & Edge).

Compatible browsers:
Chrome, Firefox, Opera, Safari
Dependencies:
-
Details/Summary Animated Accordion

Details/Summary Animated Accordion

Author:
Kam Black | July 16, 2018
Made with:
HTML / CSS (SCSS) / JavaScript

About a code

You can use this without JS and it works fine, except for the closing animation.

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Dependencies:
jquery.js, font-awesome.js
HTML <details> & <summary>

HTML <details> & <summary>

Author:
Jessica Paoli | June 2, 2018
Made with:
HTML / CSS (SCSS) / JavaScript

About a code

HTML <details> & <summary>: bad kids’ jokes.

Compatible browsers:
Chrome, Firefox, Opera, Safari
Dependencies:
jquery.js, jquery.color.js

HTML5 Details & Summary File Tree

Author:
Isaione | May 21, 2018
Made with:
HTML (Pug) / CSS (SCSS)

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Responsive:
no
Dependencies:
bootstrap.css
Details & Summary

Details & Summary

Author:
Halida Astatin | May 21, 2018
Made with:
HTML / CSS (Less) / JavaScript

About a code

Experiment with details & summary HTML tags.

Compatible browsers:
Chrome, Firefox, Opera, Safari
Dependencies:
jquery.js
<details> and <summary>: Hotel Room Selection

<details> and <summary>: Hotel Room Selection

Author:
Leena Lavanya | May 20, 2018
Made with:
HTML / CSS / JavaScript

About a code

Click one, and the others close.

Compatible browsers:
Chrome, Firefox, Opera, Safari
Dependencies:
jquery.js
Details + Summary

Details + Summary

Author:
AMAN | May 19, 2018
Made with:
HTML / CSS (SCSS)

About a code

<details> and <summary> with pure CSS. Not supported IE & Edge browsers.

Compatible browsers:
Chrome, Firefox, Opera, Safari
Dependencies:
-
Spoiler alert with <details> and <summary>

Spoiler alert with <details> and <summary>

Author:
Stephen Lee | May 18, 2018
Made with:
HTML / CSS

About a code

Using <details> and <summary> to hide/reveal spoilers.

Compatible browsers:
Chrome, Firefox, Opera, Safari
Dependencies:
-
Recipe with <details> and <summary>

Recipe with <details> and <summary>

Author:
Porgeee | May 17, 2018
Made with:
HTML / CSS

About a code

Using <details> and <summary> to create a recipe for enchiladas.

Compatible browsers:
Chrome, Firefox, Opera, Safari
Dependencies:
-
Code Snippet Repository

Code Snippet Repository

Author:
Pieter Biesemans | May 17, 2018
Made with:
HTML / CSS (SCSS) / JavaScript

About a code

Code snippet repository with HTML <details> & <summary>.

Compatible browsers:
Chrome, Firefox, Opera, Safari
Dependencies:
darcula.css, highlight.js, scss.js, list.js,
Details & Summary

Details & Summary

Author:
Mesut Koca | May 16, 2018
Made with:
HTML / CSS (SCSS)

About a code

Frequently asked questions with HTML details & summary tags.

Compatible browsers:
Chrome, Firefox, Opera, Safari
Dependencies:
tailwind.css
Details & Summary

Details & Summary

Author:
yuanchuan | May 16, 2018
Made with:
HTML / CSS / JavaScript

About a code

Code example with HTML details and summary tags.

Compatible browsers:
Chrome, Firefox, Opera, Safari
Dependencies:
-
Details and Summary

Details and Summary

Author:
Monica Wheeler | May 15, 2018
Made with:
HTML / CSS (PostCSS)

About a code

HTML frequently asked questions layout.

Compatible browsers:
Chrome, Firefox, Opera, Safari
Dependencies:
font-awesome.css
Responsive Web Page Split Screen

Responsive Web Page Split Screen

Author:
Amli | May 15, 2018
Made with:
HTML / CSS

About a code

Responsive web page with a "Split Screen" style by using only CSS. Made with HTML <details> and <summary>. Try it in small screen.

Compatible browsers:
Chrome, Firefox, Opera, Safari
Dependencies:
-
HTML details and summary

HTML details and summary

Author:
Allistair Lee | May 15, 2018
Made with:
HTML / CSS / JavaScript

About a code

Simple frequently asked questions template.

Compatible browsers:
Chrome, Firefox, Opera, Safari
Dependencies:
bootstrap.css, font-awesome.css
<details> and <summary>

<details> and <summary>

Author:
Vincent Danna | May 15, 2018
Made with:
HTML (Haml) / CSS (Sass)

About a code

Simple example with HTML details and sammary.

Compatible browsers:
Chrome, Firefox, Opera, Safari
Dependencies:
-
<details> and <summary>

<details> and <summary>

Author:
Artem | May 14, 2018
Made with:
HTML (Haml) / CSS (Sass) / JavaScript (Babel)

About a code

Quick and dirty sketch of details accordion.

Compatible browsers:
Chrome, Firefox, Opera, Safari
Dependencies:
-
Bucket List Destinations

Bucket List Destinations

Author:
Yanely Ramirez | May 14, 2018
Made with:
HTML / CSS (SCSS)

About a code

Yet another example with HTML details and summary tags.

Compatible browsers:
Chrome, Firefox, Opera, Safari
Dependencies:
-
Digital Monopoly Properties

Digital Monopoly Properties

Author:
Kyle | May 14, 2018
Made with:
HTML / CSS

About a code

Idea for using the details and summary tags.

Compatible browsers:
Chrome, Firefox, Opera, Safari
Dependencies:
-
A Detailed Summary of Life

A Detailed Summary of Life

Author:
Tony Banik | May 14, 2018
Made with:
HTML / CSS (SCSS)

About a code

A detailed summary of life with <details> & <summary>.

Compatible browsers:
Chrome, Firefox, Opera, Safari
Dependencies:
bootstrap.css, font-awesome.css
Gracefully-degrading <details> Accordion

Gracefully-degrading <details> Accordion

Author:
Keith Pickering | May 14, 2018
Made with:
HTML / CSS (SCSS) / JavaScript

About a code

The details element provides a very easy and accessible implementation of the accordion, one of the most common UI components. The problem is that the default functionality is anything but smooth. Here I've tried to solve this issue with a nice ES6 class which expands the element's functionality without breaking accessibility.

Compatible browsers:
Chrome, Edge, Firefox, Opera, Safari
Dependencies:
-
Toggle Function & Smooth Scroll Pure HTML & CSS

Toggle Function & Smooth Scroll Pure HTML & CSS

Author:
Kseso | February 14, 2018
Made with:
HTML / CSS

About a code

Grid layout + details & summary + scroll-behavior. All in pure CSS3.

Compatible browsers:
Chrome, Firefox, Opera, Safari
Dependencies:
-
Animated Collapse/Expend Component

Animated Collapse/Expend Component

Author:
Elior Tabeka | November 3, 2017
Made with:
HTML / CSS (SCSS)

About a code

Collapse/Expend with HTML details & summary.

Compatible browsers:
Chrome, Firefox, Opera, Safari
Dependencies:
-

Discover Our Extensive Snippet Library

This heading suggests that your website provides a wide variety of snippets across different technologies, encouraging users to explore and use these resources for their development projects.

HTML Snippets.

Explore a collection of HTML snippets designed to streamline your web development process. From basic structures to complex elements.

CSS Snippets.

Discover powerful CSS snippets that help you style your web pages with ease. Whether you need layout solutions, animations

JavaScript Snippets.

Enhance your website's interactivity with our JavaScript snippets. From DOM manipulation to advanced algorithms

Bootstrap Snippets.

Leverage the power of Bootstrap with our collection of snippets. Quickly integrate responsive design components

Tailwind Snippets.

Speed up your development process with Tailwind CSS snippets. These utility-first CSS snippets enable you to

jQuery Snippets.

Simplify your JavaScript development with jQuery snippets. Easily perform common tasks like event handling, animations

React Snippets.

Build robust, component-based user interfaces with our React snippets. From state management to lifecycle methods,

Vue Snippets.

Streamline Vue.js development with our collection of snippets for creating components, managing state, and handling events.

Ready to set your Brand ablaze?

Let's craft a visual identity that ignites passion and loyalty. ✨