What are the best practices for including HTML code with embedded PHP code in PHP scripts?

When including HTML code with embedded PHP code in PHP scripts, it is best practice to separate the HTML and PHP code for better readability and maintainability. This can be achieved by using PHP's `echo` or `print` functions to output HTML code within the PHP script. Additionally, it is recommended to use proper indentation and comments to clearly distinguish between the HTML and PHP sections of the code.

<?php
// PHP code
$name = "John Doe";
?>

<!DOCTYPE html>
<html>
<head>
    <title>Welcome</title>
</head>
<body>
    <h1>Welcome, <?php echo $name; ?>!</h1>
</body>
</html>