What are some best practices for integrating PHP variables into HTML tags?

When integrating PHP variables into HTML tags, it is important to properly concatenate the variables within the HTML code to ensure they are displayed correctly. One common practice is to use double quotation marks around the HTML attribute value and concatenate the PHP variable using the dot (.) operator.

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