← CodePrimer
PHP
Beginner
Basics
Embed PHP inside HTML
How do I mix PHP and HTML?
<?php ?> blocks.
<!DOCTYPE html>
<html>
<body>
<h1><?php echo 'Hello from PHP'; ?></h1>
</body>
</html>
Notes
Every PHP statement ends with a semicolon.
Keywords: php tags · embed · html · semicolon
Related
HTML
HTML headings h1–h6
How do I create page headings?
CSS
Three ways to apply CSS
What are inline, internal, and external CSS?
HTML
Paragraphs and line breaks
How do I break text into paragraphs?
CSS
CSS box model
Why is my element wider than expected?
PHP
PHP comments
How do I write comments in PHP?
HTML
Hyperlinks with href
How do I make a clickable link?