<details>
    <summary>Summary Text</summary>
    Additional details or content
</details>
Rendered Output Clicking on the "Summary Text" will show or hide the additional details.
<details>
    <summary>Summary Text</summary>
    Additional details or content
</details>
summary::-webkit-details-marker { /* Safari-specific style */
    display: none;
}
summary {
    list-style-type: none; /* Other browsers */
}

/* Both styles are required for cross-browser compatibility */
Rendered Output
summary::-webkit-details-marker { /* Safari-specific style */
    display: none;
}
summary {
    display: block; /* Other browsers */
}

/* Both styles are required for cross-browser compatibility */
Rendered Output

Last updated: 2025-09-29

See more details on caniuse.com.

<details>
    <summary>Summary Text</summary>
    Additional details or content
</details>
summary::-webkit-details-marker { /* Safari-specific style */
    display: none;
}
summary {
    display: block; /* Other browsers */
}
/* Both styles are required for cross-browser compatibility */


/* From here, we start customizing the details marker */
summary {
    position: relative;
    padding-left: 1.2em;
    cursor: pointer;
}
summary::before {
    content: "";
    position: absolute;
    border-top: 0.5em solid transparent;
    border-bottom: 0.5em solid transparent;
    border-left: 0.75em solid yellowgreen;
    top: 0.2em;
    left: 0;
    transition: .25s transform;
}
details[open] summary::before {
    transform: rotateZ(90deg);
}
Rendered Output Click the "Summary Text" to see the custom marker in action.
<details>
    <summary>Short announcement title</summary>
    <p>
        In 1989, the "World Wide Web" (WWW, W3) hypertext system was invented by Tim Berners-Lee.
        We simply call it the "web."
        It now holds a central place far beyond mere popularization in our daily lives.
    </p>
</details>
<details>
    <summary>Short announcement title</summary>
    <p>
        In 1989, the "World Wide Web" (WWW, W3) hypertext system was invented by Tim Berners-Lee.
        We simply call it the "web."
        It now holds a central place far beyond mere popularization in our daily lives.
    </p>
</details>
<details>
    <summary>Short announcement title</summary>
    <p>
        In 1989, the "World Wide Web" (WWW, W3) hypertext system was invented by Tim Berners-Lee.
        We simply call it the "web."
        It now holds a central place far beyond mere popularization in our daily lives.
    </p>
</details>
details {
    padding: 0 2rem;
    background-color: #f1f9eb;
    border: 1px solid yellowgreen;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}
details:last-child {
    margin-bottom: 0;
}
summary::-webkit-details-marker {
    display: none;
}
summary {
    display: block;
    padding: 2rem 3rem 2rem 0;
    font-weight: 600;
    cursor: pointer;
    position: relative;
}
summary::before,
summary::after {
    content: "";
    position: absolute;
    width: 1rem;
    height: 2px;
    background-color: #222;
    right: 1rem;
    top: 2.5rem;
}
summary::after {
    transform: rotateZ(90deg);
}
details p {
    padding-bottom: 2rem;
}
details[open] summary::after {
    display: none;
}
Rendered Output
<style>
    .demo-details-juqery-accordion {
        padding: 0 2rem;
        background-color: #f1f9eb;
        border: 1px solid yellowgreen;
        border-radius: 0.5rem;
        margin-bottom: 1rem;
    }
    .demo-details-juqery-accordion:last-child {
        margin-bottom: 0;
    }
    .demo-details-juqery-accordion summary::-webkit-details-marker {
        display: none;
    }
    .demo-details-juqery-accordion summary {
        display: block;
        padding: 2rem 3rem 2rem 0;
        font-weight: 600;
        cursor: pointer;
        position: relative;
    }
    .demo-details-juqery-accordion summary::before,
    .demo-details-juqery-accordion summary::after {
        content: "";
        position: absolute;
        width: 1rem;
        height: 2px;
        background-color: #222;
        right: 1rem;
        top: 2.5rem;
    }
    .demo-details-juqery-accordion summary::after {
        transform: rotateZ(90deg);
    }
    .demo-details-juqery-accordion p {
        padding-bottom: 2rem;
        display: none;
    }
    .demo-details-juqery-accordion[open] summary::after {
        display: none;
    }
</style>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<details class="demo-details-jquery-accordion">
    <summary>Short announcement title</summary>
    <p>
        In 1989, the "World Wide Web" (WWW, W3) hypertext system was invented by Tim Berners-Lee.
        We simply call it the "web."
        It now holds a central place far beyond mere popularization in our daily lives.
    </p>
</details>
<details class="demo-details-jquery-accordion">
    <summary>Short announcement title</summary>
    <p>
        In 1989, the "World Wide Web" (WWW, W3) hypertext system was invented by Tim Berners-Lee.
        We simply call it the "web."
        It now holds a central place far beyond mere popularization in our daily lives.
    </p>
</details>
<details class="demo-details-jquery-accordion">
    <summary>Short announcement title</summary>
    <p>
        In 1989, the "World Wide Web" (WWW, W3) hypertext system was invented by Tim Berners-Lee.
        We simply call it the "web."
        It now holds a central place far beyond mere popularization in our daily lives.
    </p>
</details>
<script>
    const $_details = $(".demo-details-juqery-accordion");
    const $_summary = $_details.find("summary");

    $_summary.on("click", function(e) {
        e.preventDefault();

        const $_this = $(this);
        const $_this_details = $_this.parent("details");
        const $_this_details_p = $_this_details.find("p");
        const $_this_details_open = $_this_details.attr("open");

        if (! $_this_details_open) {
            $_this_details.prop("open", true);
            $_this_details_p.stop().slideDown(600);
        } else {
            $_this_details_p.stop().slideUp(300, function() {
                $_this_details.prop("open", false);
            });
        }
    });
</script>
Rendered Output