We can Use php script anywhere in the page, but first we can open php tag.
Example:
<!Doctype Html>
<html>
<head>
<title>PHP Syntax</title>
</head>
<body>
//open php tag
<?php
Php code written here....
?>
//closed php tag
</body>
</html>