homepage Welcome to WebmasterWorld Guest from 54.161.214.221
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Google / Google SEO News and Discussion
Forum Library, Charter, Moderators: Robert Charlton & aakk9999 & brotherhood of lan & goodroi

Google SEO News and Discussion Forum

    
Writing Title Tags: How to treat Ampersands?
Liane




msg:4641752
 2:05 pm on Feb 1, 2014 (gmt 0)

When writing Title Tags, how do you treat characters such as ampersands?
For instance, do you write the code as:

Tasty Widgets | Big Bob's Bakery & Emporium

or would it be:

Tasty Widgets | Big Bob's Bakery & Emporium

by using the & does this increase the number of characters Google counts in the title and will it display correctly?

 

FranticFish




msg:4641780
 6:26 pm on Feb 1, 2014 (gmt 0)

They are capable of converting it. You can see for yourself:

Search for 'intitle:&'
My top result was a law firm with the partner initials A and O. Google returns the listing as 'A... & O...'

Now view source on that page: they use &

On a side note, I read that | might not be a good idea in titles as it means 'OR' in programming language. I never thought this myself, despite using regular expressions in Analytics where | is a separator; it's also used in htaccess.

Could be completely irrelevant, never tested it, but if you used 'Tasty Widgets: Bob's...' you'd save a character in any case.

lucy24




msg:4641798
 9:08 pm on Feb 1, 2014 (gmt 0)

Write your title tag the same way you write text in the body of the html. Exception: If the title tag has to come before the meta charset declaration, then make sure all non-ASCII characters are expressed as entities.

I read that | might not be a good idea

If so, I hope search engines understand the difference between title tags and programming languages, because I use | consistently when a page title uses two languages.

matrix_jan




msg:4641813
 12:15 am on Feb 2, 2014 (gmt 0)

I read that | might not be a good idea

Matt Cutts - "Should I use pipes or dashes in my titles?"
[youtube.com...]

lucy24




msg:4641833
 4:19 am on Feb 2, 2014 (gmt 0)

But, but, splutter-- Under what possible circumstances would pipes and dashes be considered interchangeable? A dash is punctuation;* a pipe isn't. Conversely, a pipe is ASCII while a true em-dash** isn't.


* I was thinking of conventional typography and usage when I wrote this. But then I detoured to the nearest test editor and found that, in fact, | is not recognized as \p{Punct}. Or equivalent in RegEx engine of your choice.

** as opposed to -- or (shudder) a single - hyphen with spaces to either side.

FranticFish




msg:4641851
 7:41 am on Feb 2, 2014 (gmt 0)

matrix_jan, thanks for the clarification. It would seem wierd for a symbol to be some sort of advanced operator in a title tag.

These days I favour , or ; or : to save space.

Liane




msg:4641879
 11:17 am on Feb 2, 2014 (gmt 0)

I am confused.

Matt Cutts seems to think dashes or pipes are pretty safe and that Googlebot knows how to treat them. I have seen them frequently used in search results.

Thanks for the clip Matrix_jan.

I was using pipes because I am actually using 2 or 3 distinct parts within the title. They just appear (to me) to separate three parts more distinctly than anything else. I am in the tourism industry and often write about other people's businesses for my client's information. For instance:

Tasty Widgets | Big Bob's Bakery & Emporium | My Brand

For the sake of making the intent clearer:

Nebraska Restaurants | Big Jim's Seaside Diner | My Brand

I was told that a - takes up a hair more space than a | in the title tag and it just looks better than ; , or : . but I guess : would work just as well. Am I wrong to use pipes?

lucy24, sadly, your response was a little above my head. You said:

Write your title tag the same way you write text in the body of the html. Exception: If the title tag has to come before the meta charset declaration, then make sure all non-ASCII characters are expressed as entities.


I am still using HTML 4.01 (Yes, I know I am a dinosaur)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Tasty Widgets | Big Bob's Bakery & Emporium | My Brand</title>

So . should I write the ampersand as &amp; or just &?

CaptainSalad2




msg:4641880
 11:21 am on Feb 2, 2014 (gmt 0)

I like to use &bull; to stand out, everyone uses - or |

lucy24




msg:4641957
 9:40 pm on Feb 2, 2014 (gmt 0)

should I write the ampersand as &amp; or just &?

Ampersands (also < and >) are special because you always use entities. &amp; &lt; &gt; Even in html5, which (foolishly in my opinion) will not recognize any other named entities. Not even &nbsp; or &mdash;

Browsers will display a naked ampersand just fine; it only causes trouble when immediately followed by an alphabetic. (In ebooks I have to watch out for "&c." which gets a blizzard of validation errors.) In practice > is safe too except, ahem, in the present forum; only the literal < is avoid-at-all-costs.

I am still using HTML 4.01

Me too :) I never fell into the XHTML trap, and I've never got around to changing any DTDs. Even on the occasional pages that use <wbr>.

I like to use &bull; to stand out

In the middle of an utterance?

If you've got a charset declaration, you can say and be done with it, at a savings of three bytes. Unless, haha, you're in it for the visceral satisfaction of seeing the word in your code ;)

| is one byte. A dash is at least three.

Liane




msg:4641995
 1:17 am on Feb 3, 2014 (gmt 0)

Thanks Lucy!

So the short answer is that I can write it as & or &amp; in the title tag and the browsers and Googlebot will get it right but it's safer to use &amp;

Now the next question is: If I use &amp; ... will the extra characters in the code force a title to be truncated if I am pushing the limit on space, where it would display properly if I used a naked &?

I don't think it will make any difference, but want to be certain.

lucy24




msg:4642001
 1:51 am on Feb 3, 2014 (gmt 0)

Do you mean in search results or in multi-tabbed browser display? I think we're now in "don't trouble your pretty little head about that" territory, since search engines' title truncation cutoff is much, much longer than whatever a human would get if they have a dozen tabs open.

:: detour to experiment ::

&amp; vs. & doesn't make any difference; browsers go by what's visible.

<begin topic drift>
Interesting. Safari and Firefox have a minimum tab width; open too many and you get left/right arrows to reveal the rest of your tabs. Opera (both versions) and Chrome just keep making the tab smaller, beyond the point where you can't see a single letter of the page title. I don't know what the current MSIE does. Er, they do have tabs now don't they?

Among those browsers with a minimum tab width, the exact number of visible characters varies. Once they start truncating, the ... part counts as 2 or 3 characters (not just one, even in Safari). So if your title is one letter too long, more than one letter will get cut off.
</end topic drift>

Liane




msg:4642046
 10:30 am on Feb 3, 2014 (gmt 0)

Once again, thanks Lucy! I have my answers. :)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Google / Google SEO News and Discussion
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved