What are common syntax errors that can lead to a 500 error when using PHP in HTML tags?

Common syntax errors that can lead to a 500 error when using PHP in HTML tags include missing semicolons at the end of PHP statements, mismatched quotes, and incorrect variable names or functions. To solve this issue, carefully check your PHP code for any syntax errors and make sure all statements are properly terminated.

<?php
  $name = "John";
  echo "Hello, $name!";
?>