//include the JHtml library JLoader::register('JHtml', JPATH_LIBRARIES . '/joomla/html/html.php'); //create the tooltip with the JHtml::tooltip() function $tooltip = JHtml::tooltip('Hover over me', 'This is a tooltip!'); //output the tooltip HTML echo $tooltip;In this example, we first register the JHtml library and then use the JHtml::tooltip() function to create the tooltip. The first argument to the function is the text that should be displayed on the element, and the second argument is the content of the tooltip. JHtml tooltip is part of the Joomla! framework and is included in the core Joomla! libraries.