Black Lives Matter. Please consider donating to Black Girls Code today.

Html tooltip not working

Hi,
I am using html tooltip to show extra information of Headings etc.

html.Div(className='tooltip',children=[html.H6('Posts'),html.Span('Longitude',className='tooltiptext')])

The above code doesn’t work where as the below code works on codepen

<div class='tooltip'><h2>Hover over me</h2>
  <span class="tooltiptext">Tooltip text</span>
</div>