There are myriad ways to handle HTML output. I showed you in something of a "beginner" fashion...all those echo() statements.
You can extend echo() over several newlines, thus:
<?php
echo "
<html>
<head>
<title>My Page</title>
</head>
<body>
<p>Click below to see my other page!</p>
<a href=\"otherpage.html\">Click this!</a>
</body>
";
?>
Note, of course, that you must remember things that echo can't do ... like tell when a quote is supposed to be printed to the browser, or whether it's the end of the string argument.
Probably even better, you should just escape from php by closing the tag ?> and doing your HTML as usual; you can reopen whenever you need dynamic content (or to close a conditional loop as seen below):
<?php
if (!$_SESSION['username']) {
include 'secretpage.html';
} else {
?>
<html>
<head>
<title>Access denied!</title>
</head>
<body>
<p>You are not logged in, so you cannot view this page...sorry!</p>
</body>
<?php
}
?>