• Home
  • Quick Start
  • Get Started
  • Infrastructure
  • General Web Instruction
  • Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
UT Shield
College of Fine Arts Drupal Instructions
  • Home
  • Quick Start
    • Editor Access, Workflow, Approvals & Roles
    • FAQs and Recommended Workflows
  • Get Started
    • The Dashboard
    • Content Types and Layout
      • Categories, Taxonomy and Terms
      • Landing Pages
      • Layout Builder Sections & Blocks
        • Listing Blocks
        • Reusable Blocks
        • Main Navigation Block
        • Quick Links Block
        • Featured Content Blocks
        • Ambient Video Block
      • Announcement Banner
      • Events
        • University Calendar Instructions
        • Pre-Filtered Link
    • Create, Publish, Edit, Unpublish, Delete, Archive
      • Content States: Published, Unpublished & Draft
      • Create Content
      • Edit Existing Content
      • Publishing Content
      • Delete, Unpublish, Archive
      • Revisions
      • Clone
    • Menus, Paths & Links
      • Editing Menus
      • URL Path Address
      • Create a Link
        • Linking to Another Spot on the Page
        • Pre-Filtered Link
        • Non-Visible Context and Visually Hidden
      • Secondary Menu
      • Duplicate Menu Label, URL or Title Issues
    • Rich Text Editor
      • Create a Link
        • Linking to Another Spot on the Page
        • Pre-Filtered Link
        • Non-Visible Context and Visually Hidden
      • Insert an Image
        • Left & Right Image Alignment
      • Insert a Document
      • Multimedia and Embeddable Content
      • Hide Reveal Accordions
      • Tabular Data in Tables
      • Simple 2 Column Description List
      • Responsive Word Wrapping & Hyphenation
      • HTML Source
        • Hide on Desktop or Hide on Mobile
    • Media (Images, Documents & Videos) Management
      • Insert an Image
      • Insert a Document
      • Multimedia and Embeddable Content
  • Infrastructure
    • Site Search
    • Caching
    • Community Factors
    • Database vs. Code
    • Test Site
    • Release Cycles
  • General Web Instruction

Hide Reveal Accordions

Last Updated June 2026

Hide reveal accordion content allows visitors to click on a trigger to reveal or disclose additional content on the page. Consider carefully the pros, cons and best practices of using Accordions. This feature can be very helpful on long FAQ pages and other similar content.

The Preferred Method

The easiest way is by inserting a Flex List Block in Layout Builder with the View Mode set to Accordion. Note that there is an option to display the block content as tabs on desktop that become  accordion hide reveals on mobile.

Search engines, like Google may interpret the structure of the content as indicating that certain information is supplementary or optional. Although, they may also index the content, especially FAQ content,  to use in Generative Search results. Other options below can be used to maximize keywords for search engine optimization (SEO).

Alternate Methods

There are two options for creating hide reveal accordions that require you to enter the HTML in the Source code: Detail Summary Tags and Semantic Hide Reveal Accordions.

Both methods can be used:

  • on a Content Type that does not have Layout Builder, and therefore does not have the Flex List Block.
  • within any Body field, including within another Block type. A common use case is to add the HTML for hide reveals within a Flex List Block body field that is displaying as a Tab layout.

The Semantic Hide Reveal Accordions can also be used:

  • with headings for the trigger, in order to maximize keywords for search engine optimization (SEO).
  • to slow down the open and close animation to improve the visual experience of clicking the content.

Click the Source Code button Source Code button and follow these examples:

Details Summary Tags

This method will result in the same display as the Flex List Block above.

<details>
<summary>Click this trigger</summary>
Reveal this text.
</details>

Semantic Hide Reveal Accordion

Any HTML tag can be the trigger by adding the class “cofa-reveal-trigger”. Everything below a trigger and within the Div with the class “cofa-reveal” will be revealed.

To use this feature you will need to apply two classes:

  1. cofa-reveal, to a div surrounding all hide reveal pairs.
  2. cofa-reveal-trigger, on one or more clickable trigger texts.

You will not see the change in the editing interface. Only when viewing the page will the content be hidden and revealed.

Simple Example:

<div class="cofa-reveal">
<h2 class="cofa-reveal-trigger">
Click this H2 Tag trigger
</h2>
<p>
Reveal this text.
</p>
</div>

Example with semantic hierarchy:

<div class="cofa-reveal">
<h2 class="cofa-reveal-trigger">
Click this H2 Tag trigger
</h2>
<p>
Reveal this text.
</p>
</div>
<h3 class="cofa-reveal-trigger">
Click this H3 tag trigger
</h3>
<p>
Reveal this text.
</p>

<p class="cofa-reveal-trigger">
<strong>Click this strong paragraph text trigger.</strong>
</p>
<p>
Reveal this text
</p>
</div>

To apply other styles to a trigger or the content that is hidden, apply the hide and reveal styles first and then apply all other styles.

Troubleshooting

First check to make sure that you do not have an extra return between the the hide-reveal content div and the hide-reveal-trigger. This will throw off the script that turns the hide-reveal action on.

If you are using a hid reveal accordion to hide a floated image with text running alongside the image (left or right), you may find that your text is getting pressed up against the image.  The image below demonstrates what this might look like.

Example of a floated image with text running alongside the image where the text is pressed up against the image.

This issue tends to happen if you have more than one consecutive hide reveal accordion (with images floated next to text) but it can also happen in a single hide reveal accordion.

To resolve this issue always remember to apply the class of “clear-float” to the text running alongside your floated image. For a detailed description on how to use the “clear-float” class, see our instructions on left & right image alignment.

Primary Sidebar

Open Office / Co-Working Sessions

Second Monday of the month:
11 a.m. – 12:30 p.m.

Fourth Thursday of the month:
2 p.m. – 3:30 p.m.

Email us for the Zoom link.

College of Fine Arts Web Instruction
Subscribe to our email list to receive periodic tips and resources for generating great digital content

Contact Us

The COFA Web team can be reached by emailing us at cofawebmaster@austin.utexas.edu

UT Home | Emergency Information | Site Policies | Web Accessibility | Web Privacy | Adobe Reader

© The University of Texas at Austin 2026