PHP was designed to blend seamlessly with HTML. Whenever you just want to print a single variable inside HTML, use the short echo tag <?= $variable ?>—it is cleaner and shorter than writing <?php echo $variable; ?>.
Security Habit: Always wrap user-provided text in htmlspecialchars() before printing it into HTML to prevent XSS attacks.