How should I do my title page?

How can I display a pages title meta tag on the page?

  • For instance, lets say I make 100 pages with titles like 'Home' 'About Us' etc from a single template page by entering different text in each. I want to be able to have a piece of code in the original template such that I will not need to type in each different title rather it will automatically display what I enter in the title meta tag for that page.

  • Answer:

    many ways to do this. are you using any script langauge like php, asp? its easier to do with those. you can also try to do with javascript. php version: <?php switch ($PHP_SELF) { case 'about.html': $title = 'About Page'; break; case 'index.html': $title = 'Welcome to my website'; break; .... } <html><title><?php echo $title ?></title>....

affycons at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.