What are the best practices for embedding various types of HTML elements within PHP echo statements?

When embedding various types of HTML elements within PHP echo statements, it is important to ensure proper syntax and readability. One common practice is to break up the HTML code into smaller chunks within the echo statement to make it easier to read and maintain. Additionally, using single quotes for the echo statement and double quotes for the HTML attributes can help avoid conflicts.

<?php
// Example of embedding HTML elements within PHP echo statement
echo '<div class="container">';
echo '<h1>Welcome</h1>';
echo '<p>This is a paragraph.</p>';
echo '</div>';
?>