# Normal html tags like \<span\>, \<p\>, \<h2\> are not rendering in side \<ion-list\>

**URL:** <https://forum.ionicframework.com/t/normal-html-tags-like-span-p-h2-are-not-rendering-in-side-ion-list/122995>\
**Category:** ionic-v3\
**Created:** [February 28, 2018, 3:59pm UTC](https://forum.ionicframework.com/t/normal-html-tags-like-span-p-h2-are-not-rendering-in-side-ion-list/122995 "2018-02-28T15:59:12Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![akashchandran](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@akashchandran](https://forum.ionicframework.com/u/akashchandran)\
**Post date:** [February 28, 2018, 3:59pm UTC](https://forum.ionicframework.com/t/normal-html-tags-like-span-p-h2-are-not-rendering-in-side-ion-list/122995/1 "2018-02-28T15:59:12Z")

</div>

Hi,  
I’m using IONIC 3.19.1.

```auto
<ion-content padding>
<ion-list>
  <button ion-item *ngFor="let shift of shifts">
    <h2>{{shift.operatorCode}}</h2>
    <p>{{shift.date}}</p>
    <button>hi</button>
  </button>
</ion-list>
<ion-fab right bottom>
  <button ion-fab [navPush]="shiftSetup"><ion-icon name="add"></ion-icon></button>
</ion-fab>
</ion-content>

```

in the above code snippet the `<h2>{{shift.operatorCode}}</h2> <p>{{shift.date}}</p>` are note rendering. Pls see the attachment.  
 ![ionic](https://global.discourse-cdn.com/ionicframework/original/3X/7/9/7973716e35d6882d9679dc1d25e6fd7b586045ad.PNG)

---

<div class="post-metadata">

**Author:** ![Tommertom](https://avatars.discourse-cdn.com/v4/letter/t/ed8c4c/32.png) [@Tommertom](https://forum.ionicframework.com/u/Tommertom)\
**Post date:** [February 28, 2018, 4:23pm UTC](https://forum.ionicframework.com/t/normal-html-tags-like-span-p-h2-are-not-rendering-in-side-ion-list/122995/2 "2018-02-28T16:23:44Z")

</div>

U need to wrap items in ion-item

See the example in the ionic doc on ion-list

---

<div class="post-metadata">

**Author:** ![akashchandran](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@akashchandran](https://forum.ionicframework.com/u/akashchandran)\
**Post date:** [February 28, 2018, 4:36pm UTC](https://forum.ionicframework.com/t/normal-html-tags-like-span-p-h2-are-not-rendering-in-side-ion-list/122995/3 "2018-02-28T16:36:40Z")

</div>

Hi Tommertom,

This code snippet is copied from the official doc and here they just used `<h2> and <p>` tag.

```auto
<ion-list>
  <ion-item>
    <ion-avatar item-start>
      <img src="img/avatar-cher.png">
    </ion-avatar>
    <h2>Cher</h2>
    <p>Ugh. As if.</p>
  </ion-item>
</ion-list>

```

Please see the link.

> **[Ionic Framework](https://ionicframework.com/docs/components/#avatar-list)**
>
> Ionic is the app platform for web developers. Build amazing mobile, web, and desktop apps all with one shared code base and open web standards

Thanks

---

<div class="post-metadata">

**Author:** ![Tommertom](https://avatars.discourse-cdn.com/v4/letter/t/ed8c4c/32.png) [@Tommertom](https://forum.ionicframework.com/u/Tommertom)\
**Post date:** [February 28, 2018, 4:40pm UTC](https://forum.ionicframework.com/t/normal-html-tags-like-span-p-h2-are-not-rendering-in-side-ion-list/122995/4 "2018-02-28T16:40:45Z")

</div>

Why do you have two button defintions of which one is nested in the other?

Remove the outer and make it ion-item (with the ngFor) and the look what happens?

---

<div class="post-metadata">

**Author:** ![akashchandran](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@akashchandran](https://forum.ionicframework.com/u/akashchandran)\
**Post date:** [February 28, 2018, 4:42pm UTC](https://forum.ionicframework.com/t/normal-html-tags-like-span-p-h2-are-not-rendering-in-side-ion-list/122995/5 "2018-02-28T16:42:49Z")

</div>

yeah i have already tried it but the result is the same.

---

<div class="post-metadata">

**Author:** ![Tommertom](https://avatars.discourse-cdn.com/v4/letter/t/ed8c4c/32.png) [@Tommertom](https://forum.ionicframework.com/u/Tommertom)\
**Post date:** [February 28, 2018, 5:12pm UTC](https://forum.ionicframework.com/t/normal-html-tags-like-span-p-h2-are-not-rendering-in-side-ion-list/122995/6 "2018-02-28T17:12:34Z")

</div>

Not sure if you can put these tags in an ion-button. Ion-button as ion-item has its own very designated styling (with \>)

Maybe use (click) handler on ion-item instead of using button?

Take the working example u showed from the doc

---

<div class="post-metadata">

**Author:** ![Tommertom](https://avatars.discourse-cdn.com/v4/letter/t/ed8c4c/32.png) [@Tommertom](https://forum.ionicframework.com/u/Tommertom)\
**Post date:** [February 28, 2018, 5:14pm UTC](https://forum.ionicframework.com/t/normal-html-tags-like-span-p-h2-are-not-rendering-in-side-ion-list/122995/7 "2018-02-28T17:14:55Z")

</div>

```auto
> 
> <ion-list>
> <ion-item (click)="whatever()">
> <ion-avatar item-start>
> <img src="img/avatar-cher.png">
> </ion-avatar>
> <h2>Cher</h2>
> <p>Ugh. As if.</p>
> </ion-item>
> </ion-list>

```

---

<div class="post-metadata">

**Author:** ![akashchandran](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@akashchandran](https://forum.ionicframework.com/u/akashchandran)\
**Post date:** [March 1, 2018, 2:06am UTC](https://forum.ionicframework.com/t/normal-html-tags-like-span-p-h2-are-not-rendering-in-side-ion-list/122995/8 "2018-03-01T02:06:18Z")

</div>

Hi, Tommertom.  
The issue was with the .  
I have changed it to and its worked.

Thanks for the support

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:48pm UTC](https://forum.ionicframework.com/t/normal-html-tags-like-span-p-h2-are-not-rendering-in-side-ion-list/122995/9 "2021-07-19T21:48:38Z")

</div>

Closed on July 19, 2021, 9:48pm UTC


