What is the correct way to include HTML code within a PHP script?

When including HTML code within a PHP script, you can simply echo or print the HTML code directly within the PHP script. This allows you to mix PHP logic with HTML content seamlessly. By using echo or print statements, you can output HTML code to the browser without any issues.

<?php
// PHP code
echo "<html>";
echo "<head>";
echo "<title>Hello World</title>";
echo "</head>";
echo "<body>";
echo "<h1>Hello World!</h1>";
echo "</body>";
echo "</html>";
?>