Magento 2 You can see ListText class at Magento\Framework\View\Element\Text\ListText location.
ListText class file used to Render the HTML output.
When you go to ListText file, You can see the syntax under the toHtml() function, Continue reading “What is the use of Magento\Framework\View\Element\Text\ListText class in Magento 2?”