/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function printHeader($title = NULL) { $title = $title === NULL ? 'SiteName' : "SiteName - {$title}"; print "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'> <html xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'> <head> <meta name='Description' content='CONTENT' /> <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' /> <meta http-equiv='Content-Style-Type' content='text/css' /> <link rel='StyleSheet' href='library/styles/root.css' type='text/css' media='screen' /> <link rel='StyleSheet' href='library/styles/html.css' type='text/css' media='screen' /> <link rel='stylesheet' href='library/styles/menu.css' type='text/css' />"; print "<title>{$title}</title> </head> <body>\n"; }
Comments
