How To Create Looping Semantic Lists In Divi 5

by | Mar 19, 2026 | Etcetera | 0 comments

Card-based layouts dominate trendy web design, from blog archives and staff directories to product catalogs and portfolio grids. Search engines and assistive technologies interpret the ones layouts through HTML building, not visual glance. A grid of blog publish enjoying playing cards that looks organized to sighted shoppers would perhaps appear as disconnected fragments to computer screen readers if the underlying markup lacks semantic that implies.

Divi 5’s Loop Builder generates dynamic card layouts from WordPress content material subject matter and lets you apply semantic markup through Divi 5’s Customized Attributes device and Part Kind controls, creating to be had, Search engine marketing-friendly card grids. Proper semantic building can make stronger computer screen reader navigation, make content material subject matter relationships clearer to search engines like google, and make your markup more straightforward to maintain.

The method applies the

    and

  • building to dynamic content material subject matter while layering additional semantic parts, similar to
    ,

    , and

    , within each card. Because the Loop Builder duplicates your configured column for each products throughout the query, you most straightforward want to organize the HTML building once. The loop handles the rest, generating consistent tick list markup regardless of what collection of posts exist.

    When To Use Looped Semantic Lists

    Looped semantic lists are perfect on each and every instance you display a repeating collection of similar content material subject matter generated dynamically from a query. For WordPress internet pages, this incessantly accommodates blog posts, products, portfolio items, staff individuals, testimonials, events, or supplier listings. On account of each products throughout the loop represents the identical type of content material subject matter, structuring the output as a semantic tick list helps browsers, search engines like google, and assistive technologies understand the relationship between those items.

    The usage of a

      with repeated

    • parts communicates that the items belong to a single grouped collection. This improves navigation for computer screen reader shoppers, who can in short switch through tick list items or listen what collection of items exist throughout the collection. It moreover gives search engines like google clearer signs about how related pieces of content material subject matter are organized within a internet web page.

      Looped semantic lists art work specifically smartly for card-based layouts generated by the use of Divi’s Loop Builder. Every card becomes a list products, and the loop robotically repeats that building for every finish end result throughout the query. As quickly because the semantic building is printed for the main products, Divi replicates it consistently right through all items, ensuring every generated card follows the identical to be had markup building.

      Building The Semantic Document Building

      This implementation uses a Segment containing a Row configured since the tick list container. The Row holds a looped Column that becomes each tick list products. Inside of each Column, a Module Group of workers wraps the card content material subject matter as an article. The featured image, determine, metadata, and a Button Module for the be informed further link all take a seat down right through the object.

      Get began by the use of together with a brand spanking new Segment to your internet web page throughout the Visible Builder. Click on at the Segment to open its settings. Navigate to Difficult > HTML and open the Part Kind dropdown. Select segment. This promises the Segment renders as a semantic

      element reasonably than a generic

      .

      Throughout the Segment, add a single-column flex row. Inside of this row, role a Heading Module with text that describes the loop items underneath it. When using a

      element, along with a visible heading is maximum incessantly the most efficient method, as it provides the segment with an to be had determine. An aria-label is more healthy used as a fallback when a visible heading isn’t imaginable for the design.

      Configure The Loop Row Construction And Semantics

      Add any other Row using the Flex 3 Identical Columns predefined building. This Row will serve as every the structure container and the semantic tick list wrapper.

      Switch to Design > Construction to keep watch over the rest flex houses. Permit Wrap so items go with the flow to new traces once they exceed the container width. Flexbox, blended with predefined column widths, creates a responsive structure that adapts naturally to different computer screen sizes and numbers of child parts.

      Set Flex Wrap on 3 column row

      However throughout the Row settings, navigate to Difficult > HTML. From the Part Kind dropdown, choose

        to create an unordered tick list.

        Set Loop Row to HTML Element ul to create a list

        Know how the column outlines have an extra space to their left; we’ll deal with that underneath.

        If you want an additional fallback for assistive generation, you’ll add a custom designed feature of serve as=”tick list” throughout the Attributes selection body of workers. In standard HTML, a neighborhood

          already exposes tick list semantics, so this serve as is maximum incessantly not obligatory. Some teams nevertheless make a selection so that you could upload it as a defensive accessibility measure, specifically when carefully customizing tick list presentation.

          Set Loop Row to have role=list

          Next, navigate to Difficult > CSS, then add nolist to the CSS Class field.

          Add class=nolist to loop row

          Then, add the following CSS to your site, each throughout the Divi Theme Alternatives CSS area or page-level CSS. You’ll moreover create a CSS Selection Preset if you plan to use it frequently.

      .nolist {
       list-style: none;
       padding: 0 !very important;
       margin: 0 !very important;
      }
      

      Add nolist custom CSS to page settings, theme options, or as a CSS option preset

      This CSS removes bullet markers and the default spacing browsers apply to a

        , bringing the structure once more in line with the visual design.

        Set The First Column As A Loop Products

        Delete all columns in this row with the exception of one.

        Delete all but one column in the loop row

        Click on at the lone Column to your Row, then navigate to Content material subject matter > Loop and allow the loop. Set the content material subject matter provide to Posts and configure any filtering parameters you want, similar to magnificence restrictions or publish rely limits. The Column now serves since the template that the Loop Builder duplicates for each publish matching your query. Any settings you apply proper right here, along with HTML attributes, propagate to every generated instance.

        Set the Column to Loop Element and assign your loop query data

        Navigate to the Column’s Difficult > HTML selection body of workers. Open the Part Kind dropdown and choose li. This changes the Column’s rendered element from a

        to a

      • , making each looped card a right kind tick list products throughout the dad or mum
          .

          Set the column to element type li to be a list item repeated for every looped instance

          You’ll moreover add serve as=”listitem” as a custom designed feature if your staff prefers the identical defensive method used on the dad or mum Row, then again native

        • semantics already quilt this in standard HTML.

          custom attribute on column for role eq listitem

          Now, make all the card clickable. To do that, navigate to Content material subject matter > Link and use the dynamic content material subject matter icon to assign the Loop Link. Every card could have its private link according to the Loop settings.

          Together with this to the Link selection body of workers makes the card itself clickable, expanding the interactive area previous the hooked up parts you add inside it.

          Add The Article Module Group of workers

          Every tick list products needs an

          wrapper if the card represents self-contained, standalone content material subject matter. Every looped products could be every a list products and come with an

          . Module Teams provide a at hand container for grouping all of a card’s modules proper right into a single semantic element.

          Throughout the Column, add a Module Group of workers. All other modules for this card — the image, heading, metadata, and button — will transfer inside this body of workers. Click on at the Module Group of workers to get admission to its settings, then navigate to Difficult > HTML. Open the Part Kind dropdown and choose article.

          Add The Featured Image

          Throughout the Module Group of workers, add an Image Module. This module pulls the publish’s featured image dynamically through Divi’s dynamic content material subject matter device. Click on at the dynamic content material subject matter icon throughout the Image field and choose Featured Image. The featured image frequently functions as a decide throughout the article, so navigate to the Image Module’s Difficult > HTML selection body of workers and choose decide from the Part Kind dropdown.

          The

          element identifies self-contained content material subject matter, maximum incessantly visual in nature, that relates to the encompassing article. Featured photos frequently fit that serve as smartly.

          It is a freebie and unrelated to semantics: in image-based loops, surroundings a continuing aspect ratio makes every card actually really feel further uniform. To do this, add a custom designed feature similar to magnificence=”looped-image-aspect” to the image and then add some custom designed CSS.

          .looped-image-aspect .et_pb_image_wrap {
           width: 100%;
           aspect-ratio: 16 / 11;
           overflow: hidden;
          }
          
          .looped-image-aspect img {
           width: 100%;
           height: 100%;
           object-fit: quilt;
           object-position: center bottom;
          }
          

          Configure The Post Title

          Beneath the Image Module, nevertheless right through the Module Group of workers, add a Heading Module. Click on at the dynamic content material subject matter icon and assign it to the Post Title. Then navigate to Difficult > HTML and open the Part Kind dropdown. Select header. This wraps the heading in a semantic

          element, indicating the object’s introductory content material subject matter.

          Throughout the Content material subject matter > Heading selection body of workers, set the heading level to H3 or H4. The H2 level is reserved for number one internet web page sections, and each card determine functions as a subsection heading throughout the tick list. For the reason that example above uses an H2 heading for the segment, H3 works smartly for the card titles.

          Set the Heading Level of the Heading Module to H3

          You’ll notice I’m using sorts from my design device and won’t be overlaying them in this article. We’ve already printed an intensive publish about creating a design device with Design Variables and nested or stacked presets, which you’ll reference for styling.

          Configure The Post Meta

          Beneath the Heading Module, nevertheless right through the Module Group of workers, add Text Modules for each piece of metadata you want to turn. Common possible choices include magnificence, date, and author. For each Text Module, click on at the dynamic content material subject matter icon and assign the right kind field. For the category, choose find out how to link to magnificence archive pages.

          The category renders as its private tag pointing to the category archive, retaining it independent from the other links throughout the card.

          At this point, set some Flex settings on the Group of workers to put the two Text Modules ingredient by the use of ingredient when there is also enough room. To do that, set the Flex Path to Row, Justify Content material subject matter to Space Between, and allow Wrapping.

          Article Group Flex Settings for Child Items

          Add The Be told Further Button

          Beneath the Heading Module and Text Modules, add a Button Module. Set the button text to Be told Further or your preferred title to movement. Navigate to Content material subject matter > Link and use the dynamic content material subject matter icon to assign the Loop Link. Every looped card will now have a button linking to its corresponding publish.

          The Button Module outputs a real element throughout the markup. While all of the card is clickable right through the Column’s Link surroundings, the Button provides a clear, semantic link function that assistive technologies and search engines like google can interpret without delay.

          Complete HTML Building Reference

          Semantically, we’re accomplished. The overall rendered HTML to your semantic tick list follows this hierarchy, with a few additional wrapper parts depending for your Divi configuration

           

          Every element serves a selected semantic serve as. This is a lot of art work, specifically the main time, then again it’s value it for loops. When you get the development correct, Divi repeats it for every products throughout the query, so that you’re effectively designing a couple of semantically proper enjoying playing cards instantly.

          I’ll end with most of the finishing design touches, despite the fact that not all of them, on account of this publish is concentrated on the semantics of this card building.

          Where And When To Use Semantic Lists

          The

            and

          • building applies on each and every instance you display a collection of similar items without inherent ordering. Blog publish archives, staff member directories, product catalogs, portfolio galleries, testimonial collections, navigation menus, and service listings all qualify as unordered lists. If the gathering problems, similar to step-by-step instructions or ranked results, use
              instead.

              When To Use Other Semantic HTML Portions

              We’ve covered various semantic HTML parts above, so right here’s a quick reference for each one:

              The

              element belongs inside tick list items when each products represents standalone content material subject matter. Blog posts, products, staff bios, and case analysis can all be considered articles, specifically if they’ve their own standalone URLs. Navigation links, social icons, and simple labels don’t appear to be articles. Reserve article markup for content material subject matter that might meaningfully exist independent of its surrounding context.

              The

              element introduces content material subject matter within just a little or article. It maximum incessantly accommodates headings, then again may also include navigation, logos, or introductory text. Every

              could have its private

              , distinct from the page-level header. In card layouts, wrapping the determine in a

              signs that it introduces the object content material subject matter that follows.

              The

              element closes just a little or article with supplementary wisdom. Author attribution, newsletter dates, related links, and copyright notices can transfer proper right here. Like

              , each

              can come with its private

              , however it indisputably does not always need one. For blog enjoying playing cards, metadata like date and sophistication could be situated in a

              in case you need that grouping over leaving them as standalone parts.

              The

              and
              parts pair together for self-contained visual media with not obligatory captions. The

              wraps photos, diagrams, tables, icons, or films that toughen the encompassing content material subject matter. The
              provides a caption or description and appears as each the main or final child of

              . For staff member enjoying playing cards, a
              containing the person’s determine and determine beneath their image can create cleaner semantics than separate text parts.

              Get began Building In Divi 5 These days!

              Semantic HTML transforms visual card layouts into machine-readable content material subject matter constructions. When used as it should be, computer screen readers can upper interpret tick list items and article limitations, and search engines like google can upper understand content material subject matter relationships.

              Divi 5‘s Loop Builder, Custom designed Attributes, and Part Kind controls provide the tools needed to layer semantic parts onto dynamic layouts. The Loop Builder multiplies your configuration right through dynamic content material subject matter, generating consistent tick list markup for any choice of items.

              The publish How To Create Looping Semantic Lists In Divi 5 gave the impression first on Sublime Issues Weblog.

              WordPress Web Design

              [ continue ]

WordPress Maintenance Plans | WordPress Hosting

read more

0 Comments

Submit a Comment

DON'T LET YOUR WEBSITE GET DESTROYED BY HACKERS!

Get your FREE copy of our Cyber Security for WordPress® whitepaper.

You'll also get exclusive access to discounts that are only found at the bottom of our WP CyberSec whitepaper.

You have Successfully Subscribed!