Fixing Wordpress Title and Description Tag Placement
-
I know how important the title and description tag are and I know it is important to have them place at the top of the code. However, when I view the source on a Wordpress template, I see it looks messy. Here is an example of what the source looks like. Is there a plugin or an adjustment to be made so the code is cleaner? To get rid of spaces and blank lines in code. Or should I just not worry about the way the code looks?
Notice the first example has a break after the <title>, then after the title there is this</p> <p style="color: #5e5e5e;"><strong><em><meta http-equiv="content-type" content="text/html; charset=UTF-8" /> </em></strong></p> <p style="color: #5e5e5e;"><strong><em> </em></strong>then the description? Can that be moved?</p> <p style="color: #5e5e5e;"> </p> <p style="color: #5e5e5e;"><span style="color: #5e5e5e;"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></span><span style="color: #5e5e5e;"><br /></span><span style="color: #5e5e5e;"><html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"></span><span style="color: #5e5e5e;"><br /></span><span style="color: #5e5e5e;"><span> </span><head profile="http://gmpg.org/xfn/11"></span><span style="color: #5e5e5e;"><br /></span><span style="color: #5e5e5e;"><span> </span><title></span><span style="color: #5e5e5e;"><br /></span><span style="color: #5e5e5e;"><span> </span>tite text goes here <span> </span></title> " />
Here there are no breaks after <title>and the <title> is directly above the description</p> <p style="color: #5e5e5e;"> </p> <p style="color: #5e5e5e;"><span style="color: #5e5e5e;"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></span></p> <p style="color: #5e5e5e;"><span style="color: #5e5e5e;"> </span><span style="color: #5e5e5e;"><html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"></span></p> <p style="color: #5e5e5e;"><span style="color: #5e5e5e;"><head profile="http://gmpg.org/xfn/11"></span></p> <p style="color: #5e5e5e;"><span style="color: #5e5e5e;"><meta http-equiv="content-type" content="text/html; charset=UTF-8" /></span></p> <p style="color: #5e5e5e;"><span style="color: #5e5e5e;"><title>tite text goes here</title>
-
RDK is right on. I would add some sites go a step further and compress their html code. This step improves the page loading speed a tiny bit as it saves the browser from having to do this work. Reading the html code becomes much more difficult when all the spaces are removed.
-
Viewing the source will look different, depending on how you're getting the source into an editor. On many CRM (wordpress, joomla, etc) the source code can display differently than it is stored on the back-end.
Luckily, spaces don't matter. They are essentially deleted when a browser renders them.
The title and description tags must be in the section and it doesn't matter where they are within the head section . Just make sure they don't come after the tag.
Don't worry, be happy.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Duplicated page titles
Dear friends, We have a problem which occurs on our page with duplicated page titles. Landlords are posting rooms on our page and most of them are giving the same name to the rooms and after that, we are getting more and more duplicated page titles. We are applying random whit this title tag: Accommodation for students in {city.name}: {name}. English title
On-Page Optimization | | Eurasmus.com
Certified student rooms in {city.name}: {name} English title
Erasmus room for students in {city.name} | {name} English title
Student room in {city.name}: {name} English title Also our title tag is sometimes to long but there is no possibility to make them shorter. I think. If anyone would have some idea be free to comment and help us. Kind regards Miško Macolić Tomičić0 -
The actual title tag is different from the one showing in SEOmoz
Hello all I was looking at the crawling report for my project, I have noticed that there are so many duplicate titles in the "Duplicate Page Title" report, I checked the title tag for one of the titles (for this page) manually (in the page code), and it was showing like this: <title></span><span>Interviews | TechSparks</span><span></title> where it's showing in the "Duplicate Page Title" report like this: Interviews | TechSparksEasyRotator Preview Hovering over the tab in the browser shows the title as I mentioned first, and searching Google for this page shows the title like the first one I mentioned too. Do you any clue why that is happening? fUbtXe6 fUbtXe6.png
On-Page Optimization | | MHD0 -
Title Tags: Does having the singular and plural version of the keyword hurt the ranking?
I'm wondering if there is a duplication issue with having a singular AND plural version of a keyword in the Title Tag. For example: Wood Desk - Wood Desks| Furniture Store Would this help or hurt my ranking for this URL? I can’t find a concrete answer for this under Moz’s “Title Tag SEO Best Practices Page.” Thanks for your help!
On-Page Optimization | | jampaper0 -
I have 75 pages with missing meta tag descriptions. So I add them or do they make no sense?
I have 75 pages with missing meta tag descriptions. So I add them or do they make no sense?
On-Page Optimization | | sarthakss0 -
Text Placement?
We have an eCommerce site. We have noticed several of our competitors are moving their text to the top of the page. How much of a difference to you think it makes in googles eyes to have the text at the top above the products vs bellow them? Here is an example of how one of them moved the text to the top http://www.motorcycle-superstore.com/119/MNGR/Motorcycle-Jackets.aspx
On-Page Optimization | | DoRM0 -
Colons and commas in title tags instead of hyphens and pipes ?
Hi In light of Google changing display of title tag from character limit to pixel limit does it make sense to swap some uses of pipes and hyphens with colons and commas ? For example: Category: Keyword, Keyword, Keyword | Brand Instead of: Category - Keyword - Keyword - Keyword | Brand I seem to remember hearing bad things about colons in title tags but think that was just in regard to when used multiple times. Surely ok to use once if in logical format ? Cheers Dan
On-Page Optimization | | Dan-Lawrence0 -
Title tag - shorter = better?
Is it true that the shorter the Title tag is the more powerful the keywords in it are?
On-Page Optimization | | echo1
I know that the main keywords have to be at the beginning of the title but, having more words in your Title could dilute the effectiveness of your main keywords? Ex: Dallas limo service | Private car by SelectLimousine. Could the fact that I have a second part of my title affect the first part by diluting its value? I would like to rank first for Dallas car service but also for Dallas car service and Dallas limousine service. Is this good practice?0 -
Title tag for category page
I’d love some clarification on what would be the best title tag for a shopping category page. The category page is “prams” , the brand is Baby Huddle and the top keywords in order of importance are pushchairs, strollers and buggies. Here are the options I suggest: Buy Prams | Pushchairs, Strollers, Buggies | Baby Huddle Buy the best prams, pushchairs, strollers and buggies on Baby Huddle Buy prams with free delivery and great prices on Baby Huddle
On-Page Optimization | | walidalsaqqaf0