There are several ways to call a database and display the data on an HTML page, but one common method is to use a server-side scripting language like PHP or Python to retrieve the data from the database and generate HTML code dynamically.
In this example, we connect to the database using the mysqli_connect() function, query the database using the mysqli_query() function, loop through the result set using a while loop and output HTML code using echo. Finally, we close the database connection using the mysqli_close() function.
Of course, this is just a basic example and there are many other things you might need to do when working with a database, such as handling errors, sanitizing input, and more. It’s also worth noting that there are other server-side scripting languages and database systems you could use, depending on your needs and preferences.