setting page title

  • allgoodpeople
  • Proficient
  • Proficient
  • User avatar
  • Posts: 379
  • Loc: here

Post 3+ Months Ago

Can you set the page title with CSS so all pages automatically get the same title, or do you have to manually put in the <title> tags for each page?

Mark
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • RichB
  • Guru
  • Guru
  • User avatar
  • Posts: 1121
  • Loc: Boston

Post 3+ Months Ago

I don't think you can do it with CSS, but you could use javascript (assuming the user has javascript enabled). You could put something like this in a .js file and then link it from your html files:

Code: [ Select ]
document.title = "blah blah blah";


I don't know how backwards-compatible it is, but it works in IE6, Mozilla 1.5 and Opera 7.
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

Of course, if it's not in a title tag, then Google isn't going to see it, and use the URL of the page as the title.
  • RichB
  • Guru
  • Guru
  • User avatar
  • Posts: 1121
  • Loc: Boston

Post 3+ Months Ago

That's true. This is probably a case of "just because you can do it doesn't necessarily mean that you should."
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

Access to ASP by any chance ?
you could use an INCLUDE like a css sheet for your titles putting
Code: [ Select ]
<!-- #include file="titles.asp" -->
<html>
<head><%= title %></head>
  1. <!-- #include file="titles.asp" -->
  2. <html>
  3. <head><%= title %></head>

and define the title variable as
Code: [ Select ]
<%
dim title
title = "<title>whatever it is for today</title>"
%>
  1. <%
  2. dim title
  3. title = "<title>whatever it is for today</title>"
  4. %>
inside title.asp

from that you can construct a rotator or something
plus google would see it :D
EDIT-----------------------------
actually im not sure if google would see it or not anyone have an answer?

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 57 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.