<!DOCTYPE html>
<html>
<head>
<title>My PHP Page</title>
</head>
<body>
<?php
// This is a comment in PHP
$message = "Hello, World!"; // Assign a string value to a variable
echo $message; // Print the value of the variable to the screen
?>
</body>
</html>
Hello, World!
<!DOCTYPE html>
`: This is the document type declaration for an HTML document.<html>
`: This tag denotes the beginning of an HTML document.<head>
`: This tag denotes the beginning of the head section of the HTML document, where meta information is usually placed.<title>
`: This tag specifies the title of the web page.</head>
`: This tag denotes the end of the head section.<body>
`: This tag denotes the beginning of the body section of the HTML document, where the visible content of the web page is placed.`<?php`
and
`?>`
: These tags are used to delimit PHP code within an HTML document.// This is a comment in PHP
`: This is a comment in PHP. Comments are not executed by the PHP interpreter.$message = "Hello, World!";
`: This line of code declares a variable called `$message
` and assigns it the string value "Hello, World!".echo $message;
`: This line of code prints the value of the `$message
` variable to the screen.<?php` and `?>
` tags.