Components
Importing a page can be done by
<?wsp LoadPage["header.wsp", {title = "Hi"}] ?>
The second argument is optional and passes them to Block function, i.e. you can create modules/components. Inside header.html we can write
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title> <?wsp title ?> </title>
</head>
Of course you can even define function with HTML code inside to generate content and use them later
<?wsp SetDelayed[say[i_], ?> <h1><?wsp i ?></h1> <?wsp ]; "" ?>