Print HTML Head


/ Published in: PHP
Save to your folder(s)



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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.