What is the correct syntax for embedding PHP variables within HTML code in PHP scripts?

When embedding PHP variables within HTML code in PHP scripts, the correct syntax is to use the opening and closing PHP tags `<?php` and `?>` to switch between PHP and HTML. Within the HTML code, you can simply echo the PHP variable using the `echo` or `print` statement. This allows you to dynamically insert PHP variable values into your HTML output.

&lt;?php
$variable = &quot;Hello, World!&quot;;
?&gt;
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Embedding PHP Variables in HTML&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;h1&gt;&lt;?php echo $variable; ?&gt;&lt;/h1&gt;
&lt;/body&gt;
&lt;/html&gt;