Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
putting the <title> in another place besides the head
Old 12-28-2005, 11:49 AM putting the <title> in another place besides the head
capetek's Avatar
Extreme Talker

Posts: 229
Location: Massachusetts
Trades: 0
Hello,

Not sure if this belongs in php or html becuase it does have a little of both.

Im trying to send a dynamic <title> to each page. I know its bad web practice to put the <title> tag</title> anywhere else besides the head and will show flags when bringing it to strict. What im wondering is, does it actually effect anything? If you put the <title> tag in the body it still works! It not only works but if i put it where i need it to be i can echo a variable to the title to keep it dynamic. Im just wondering what the downside of doing this is besides keeping the code strict.
__________________
Anthony LeBoeuf
Cape-Tek IT Solutions

Please login or register to view this content. Registration is FREE

Great hosting at affordable pricing!
capetek is offline
Reply With Quote
View Public Profile Visit capetek's homepage!
 
 
Register now for full access!
Old 12-28-2005, 08:48 PM
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
You can generate dynamic titles in the head section with php. The php code doen't care where in the document it's located. Is there a reason why you think you need to echo a variable to the title outside the head section?
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 12-28-2005, 09:54 PM
capetek's Avatar
Extreme Talker

Posts: 229
Location: Massachusetts
Trades: 0
I was under the impression that you if you dont set your variable before you call it then it doesnt know it exists.
__________________
Anthony LeBoeuf
Cape-Tek IT Solutions

Please login or register to view this content. Registration is FREE

Great hosting at affordable pricing!
capetek is offline
Reply With Quote
View Public Profile Visit capetek's homepage!
 
Old 12-29-2005, 02:20 AM
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
Couldn't you set the variable with:

$title = your dynamic code;

and have it be in the head of the document above where you call it in with:

<title><?php echo $title; ?><title>

Maybe I'm missing something. How are you trying to set the variable now? Is the way you're setting the variable based on things later in the page that appear in the body?
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 12-29-2005, 07:19 AM
amygdela's Avatar
Super Talker

Posts: 111
Trades: 0
I think vangogh's way is the only correct way. Just dynamiclly generate the title in a variable, so you can use it over and over again.
__________________

Please login or register to view this content. Registration is FREE
amygdela is offline
Reply With Quote
View Public Profile
 
Old 12-30-2005, 05:48 AM
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
Side note:
Quote:
If you put the <title> tag in the body it still works!
True, it might work in IE and maybe Firefox, but what about other lesser used browsers, mobile phones, PDAs, screen readres, etc?
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 12-30-2005, 09:39 AM
capetek's Avatar
Extreme Talker

Posts: 229
Location: Massachusetts
Trades: 0
Thanks for your help everyone, well I was modifying a very old OScommerce script and i could not exactly rearranage the code to push the item name to the title. The client did not want to upgrade his oscommerce either. Ah well thanks everyone
__________________
Anthony LeBoeuf
Cape-Tek IT Solutions

Please login or register to view this content. Registration is FREE

Great hosting at affordable pricing!
capetek is offline
Reply With Quote
View Public Profile Visit capetek's homepage!
 
Old 06-12-2009, 11:59 AM Re: putting the <title> in another place besides the head
thefandango's Avatar
Extreme Talker

Posts: 215
Trades: 0
Interesting thought - cant imagine why anyone would want the title tag outside the head but I for one did not realise you could!
__________________

Please login or register to view this content. Registration is FREE

thefandango is offline
Reply With Quote
View Public Profile
 
Old 06-12-2009, 12:46 PM Re: putting the <title> in another place besides the head
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
I for one did not realise you could!
You can't, the <title> tag belongs in the <head> and sticking it elsewhere would be invalid. You can, however use the same 'title' as the H1 tag on the site.

Quote:
I want help about what should be the exact length of title tag and why?
There is no 'exact length', but the recommendation is around 80-100 characters.
Quote:
My second question is it necessary to write Meta tags?
To a point, yes. The meta keywords tag is pointless since none of the major search engines pay any attention to it. It was abused for so long, they mostly now ignore it. The meta description tag, however, IS important, and you should always use one. A lot of the other meta tags you see aren't even necessary.

By the way.. please don't revive FOUR year old threads - start a new one!!!!
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 06-15-2009, 10:06 AM Re: putting the <title> in another place besides the head
Average Talker

Posts: 18
Location: US
Trades: 0
Quote:
Originally Posted by LadynRed View Post
You can't, the <title> tag belongs in the <head> and sticking it elsewhere would be invalid. You can, however use the same 'title' as the H1 tag on the site.

There is no 'exact length', but the recommendation is around 80-100 characters.

To a point, yes. The meta keywords tag is pointless since none of the major search engines pay any attention to it. It was abused for so long, they mostly now ignore it. The meta description tag, however, IS important, and you should always use one. A lot of the other meta tags you see aren't even necessary.

By the way.. please don't revive FOUR year old threads - start a new one!!!!
thanks a lot for your nice words it has been a very good experience.
mint1 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to putting the <title> in another place besides the head
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.45610 seconds with 12 queries