Hi,
I do not see an issue.
1. the simple "list" function
2. IF function with "join" and "br/"
3. IF function with "ul" and "li"
And furthermore you can use all elements of bootstrap 5. Have a look at "listgroup", like
<ul class="list-group">
{if(Q1_1=="Y",'<li class="list-group-item">'+Q1_1.shown+'</li>','')}
{if(Q1_2=="Y",'<li class="list-group-item">'+Q1_2.shown+'</li>','')}
{if(Q1_3=="Y",'<li class="list-group-item">'+Q1_3.shown+'</li>','')}
{if(Q1_4=="Y",'<li class="list-group-item">'+Q1_4.shown+'</li>','')}
{if(Q1_5=="Y",'<li class="list-group-item">'+Q1_5.shown+'</li>','')}
</ul>
And I found a real short solution with "listifop"
<ul><li>
{listifop( "code", "==", "Y", "shown", "</li><li>", that.Q1.sgqa)}
</ul>
So it is necessary that you send a lss export of your survey (this relevant questioon) and mention the exact version of your installation.
Joffm