Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
ganesh art
Courses Plus Student 641 PointsTitle tags
I watching the part where Nick Pettit teaches how and why to use title tag. He says Title tags appear on google search engine results and on the browser window/tab when we open a particular website. Title tags appear fine on the example Nick shows, But why are title tags of teamtreehouse.com different ? In search Engine results the title tag is "Start Learning at Treehouse for Free" In website window/tab the title tag is Treehouse | Home
Does this mean we can add more than one title tag to a website/web page?
2 Answers
peyton caseria
Courses Plus Student 12,281 PointsWhen you are putting a title in the head tag within the html ex.
<head>
<title>My Example</title>
</head>
You are targeting keywords inside the title, a page can have multiple titles but they would redirect to the same page, so adding a title twice is bad practice if you do this on the same page, just because it goes by a character limit.
However if you target multiple keywords to the limit, of a page title, and make a second page that has a different set of keywords and serves the same purpose, or something else really fancy.Titles bring in a lot of traffic, they are more important text as far as googles algorithm is concerned. I would suggest using the app / chrome extension called wappalyzer.
I can tell you are incredibly curious, The code you are talking about is written in ruby on the rails framework =)
I'm not exactly sure how treehouse does this to be honest! Will you post some examples?
I can think of 2 ways in ruby to do this, however if there is at least 2 ways to do something in ruby you'll have far more solutions.
I'm going to look more into this, Great find!
ganesh art
Courses Plus Student 641 PointsI think i got a little mixed up :P I saw the treehouse home page when i was logged in. And obviously I saw a diffrent page with different title tag. bdw wappalyzer is really goood (I use datanyze insider)