php - How can I have a doctype file for each page and a title for each page? -
my crazy web teacher requires doctype.php file in each of webpages avoid repetition, this:
<?php include 'doctype.php'; ?>
however, need different title each page.
<head> <title>activities @ pacific trails resort</title> </head>
this doesn't pass in http://validator.w3.org/. how include doctype , title?
in doctype.php page add following:
<!doctype html>
(the trailing empty line intentional, need ensure exists in doctype.php file.)
in each of other pages, should like:
<?php include 'doctype.php'; ?> <html> <head> <title>activities @ pacific trails resort</title> </head> <body> <!-- content --> </body> </html>
then when visit each page, output like:
<!doctype html> <html> <head> <title>activities @ pacific trails resort</title> </head> <body> <!-- content --> </body> </html>
Comments
Post a Comment