I can't get my title tag to work

Hi all
Please help because this is driving me insane. I can’t get the title to show up. I’ve copied and pasted title tags from many different sites, so I’m sure the code is right. Am I putting it in the wrong place? Or what other dozy mistake am I making?

My code from the top is:
<html xmlns=“http://www.w3.org/1999/xhtml”>

<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1” />
<title><snip /></title>

<link href=“gw2.css” rel=“stylesheet” type=“text/css” />
<style type=“text/css”>


Any suggestions welcome!

<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1” />
<title><?php metatitle();?></title>
<meta name=“description” content=“<?php metadescription();?>” />
<meta name=“keywords” content=“<?php metakeywords();?>” />
<link href=“style.css” rel=“stylesheet” type=“text/css” />

That is the code I use have you tried clearing your history?

There must be something weird with your page; are you making sure you are refreshing your browser and looking at the correct file. Plus saving it first before viewing?

Try copy-and-pasting this into a plain text document and saving as a new *.htm file:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="http://www.w3.org/1999/xhtml">
    <meta http-equiv="Content-Type" content=
    "text/html; charset=UTF-8" />
      <snip />
    <link href="gw2.css" rel="stylesheet" type="text/css" />

It will work assuming your computer is working and functioning normally.

Thanks so much guys. It was the spurious style tags lying around in the head that seem to have messed things up. At least it’s gratifying to know that I was doing the rest of it right!

Just need loads more practice I guess!


you needs to check your website at w3c validator. w3c validator told you clearly what is the problem?


Thanks so much Seo, I’ll do that next time!

Well, I’ve sorted it out and it is a little embarrassing really! It turns out that it is because the site is being diverted! So rather than the title showing, the diversion symbol was displaying instead. All very simple in the end, and at least it was gratifying to know that my code was right :wink: . Also learnt about the w3c validator so it was a useful error to make. I’m just putting all the gory details of my elemental error in public so that any other newbies with a similar problem might be saved the embarrassment of going public with it!

Thanks all who tried to help.

No problem, perhaps you’d also like to try your hand as the ‘The SPF Pure HTML & CSS Competition!’? (refer to my orange signature link below).

I know you are only starting (but that doesn’t matter to me and I am a Judge) if you have some time give it a try it won’t be any more embarrassing than getting muddled with the TITLE element.

You should at least be able to do some of the HTML part now you have gained some additional skills. I’d personally prefer to see people of ‘all abilities’ try rather than listen to some of those professionals that keep on whining about the rules.

Wow, there’s no way that I’m anywhere near prize-winning standard! But this would certainly be extremely good practice for me. I will have a go, and will even send you what I come up with! (Although doing it within your timescale may not be possible as life has a habit of interfering!)
Thanks for the suggestion, and the encouragement.

No worries give it a go, if you have time… I know you may find it a ‘struggle’ but I was genuine when referring to the fact I am impressed more by somebody considers trying regardless of skill.


Robert Wellock