How this example works
The caption names the table, scope connects headers to columns, and the Sort button moves existing body rows into numerical order.
Try a change
Add a product and quantity, then sort again. Change the comparison to use the product name with localeCompare.