What is the recommended method for including PHP code within HTML code to ensure proper execution?

When including PHP code within HTML code, it is recommended to use the `<?php ?>` tags to ensure proper execution. This allows the server to differentiate between PHP and HTML code. By enclosing the PHP code within these tags, you can seamlessly integrate dynamic content into your HTML pages.

&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;PHP in HTML&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;h1&gt;Welcome!&lt;/h1&gt;
    &lt;?php
        $name = &quot;John&quot;;
        echo &quot;Hello, &quot; . $name . &quot;!&quot;;
    ?&gt;
&lt;/body&gt;
&lt;/html&gt;