What would cause the <title> tag not to function?

  • Frostbyt3
  • Graduate
  • Graduate
  • User avatar
  • Posts: 221
  • Loc: Corpus Christi, TX

Post 3+ Months Ago

I'm setting the title of the page using the <title> tags for my web page, but for some reason the pages still say "Untitled Document".

Code: [ Select ]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<?php include ("inc/conf.php"); ?>
<head>
<title>LOL</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="HAPedit 3.1">
<link href="inc/style2.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="container">
<div id="header"></div>
<div id="menulist">
<div id="menuhold">
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html>
  3. <?php include ("inc/conf.php"); ?>
  4. <head>
  5. <title>LOL</title>
  6. <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
  7. <meta name="generator" content="HAPedit 3.1">
  8. <link href="inc/style2.css" rel="stylesheet" type="text/css">
  9. </head>
  10. <body>
  11. <div id="container">
  12. <div id="header"></div>
  13. <div id="menulist">
  14. <div id="menuhold">


There's the first part of my page and Firefox AND IE display the page properly, except it is still titled "Untitled Document". The only time it works correctly is if I use dreamweavers "Preview in Browser" option. THEN the title displays correctly.

Any clue what could cause this to happen?

Thanks
  • Frostbyt3
  • Graduate
  • Graduate
  • User avatar
  • Posts: 221
  • Loc: Corpus Christi, TX

Post 3+ Months Ago

Okay so for some weird reason, I put the first PHP Include in the body of the page and it works fine now.

I would still like to know why that include was disabling the title tag..?
  • Frostbyt3
  • Graduate
  • Graduate
  • User avatar
  • Posts: 221
  • Loc: Corpus Christi, TX

Post 3+ Months Ago

Nevermind I see what I did. The conf.php was not blank. I had created a new file straight to the ftp which resulted in a blank HTML page with all the tags.

Since it was in the header, the <title> tags (which were blank) in the conf.php were over-riding the ones I had set in the index.

Thanks
:D
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23455
  • Loc: Woodbridge VA

Post 3+ Months Ago

Thanks for explaining what happened. Glad you resolved it
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

So basically the browser uses the first <title> element it finds and ignores any further <title> elements in the page ?

That's rather interesting behavior.

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 64 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.