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.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
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
-
Page Title (Meta descriptions) length... how strict are you?
I have just had a conversation with a client... the gist was this... Is it more important to stay under the 55-60 characters OR go over a bit and have the page title make sense and include the clients company name. The same argument for meta description. I have a client insisting on 55-60 length but the keywords are long and if we use the primary keyword phrase the length is 44 if we use the keyword phrase and add the company name it becomes 64. This is with us trimming it a bit. Anyone else discussed this before?
On-Page Optimization | | JohnW-UK1 -
Unkown H1-Tag on my webshop
Dear community, I have a unknown and undetecable H1-tag on my webshop. I'm currently optimizing my webshop and get stuck by two H1-tags on every page. Does anyone know where i can remove this H1-tag? My webshop URL: www.rijwielcashencarry.nl Thanks!
On-Page Optimization | | rijwielcashencarry0400 -
SEO Title Tag Best Practice?
Hi, I would like to know if appending site name at the end of page title ( page title -_ Site Name/Site URL_ ) is a good/bad practice in reference to SEO? If a good practice which is better ( Site Name or Site URL )? Example: 20 Things you didn't know about zombies - coed.com Thanks in advance
On-Page Optimization | | COEDMediaGroup0 -
Title tag formatting
So I thought I had Title tags cracked... Unique to each page Priority phrases at the start Under 70 characters inc spaces No spamming of keyword phrase Brand at the end But do people believe that this structure is bad? <keyword 1="" phrase="">| <keyword 2="" phrase="">|<brand></brand></keyword></keyword> and that Title tags should now be structure more like full sentences? And does using the same keyword phrase on several pages dilute or cannibalize results? Thanks
On-Page Optimization | | ToonyWoony
Kate0 -
Am I cannabalizing my title tags or is there a better way?
I've read some info about title tags and meta, and I'm getting a little confused. If there is a previous discussion that I've missed, please redirect me. thank you. So I have a locksmith and one of his pages is on Auto Locksmith. For every car, I have a page. i.e Acura, Audi, BMW etc. Here is my title tag: Acura Car Keys| Ignition Switch Repair| Key Duplication BMW Car Keys| Ignition Switch Repair| Key Duplication Same for the rest of the different car models on the site. I previously asked a question on here about "What is Cannibalization", and after reading the answer, as well as a full article about it, I think I may be potentially cannibalizing my site with these title tags, though my SEO Moz has not indicated that I am. Should my title tags be instead... Acura car keys| Acura Ignition Switch Repair| Acura Key Duplication for each vehicle page? Additionally, all the Meta Descriptions on each vehicle page read the same as well. Is this correct? We duplicate Acura car keys, repair ignition switches, extract broken keys, replace remotes, reprogram transponder keys and provide emergency locksmith srvc. Lastly, this is for a city, yet I have not placed the city modifier in my tags nor content. Somehow it knows what city I'm in because some of my pages are ranking on Page 1, however other pages are ranking like #188, #257...So I'm just confused. Thanks for any help you can provide. Jaye
On-Page Optimization | | jayestovall0 -
How to fix duplicate page content and page titles?
Apologies in advance if this has already been answered (it probably has) - I'm just not seeing it. Is there a guide on here for how to fix the issues brought up by the crawler - specifically, things like duplicate page content, or duplicate page titles? A lot of these seem to have been created by wordpress.org combos that I didn't anticipate - i.e., category pages, author pages, etc. The crawler brings up the problems, but I don' t know where to start to go about fixing them. Also, any guide on best SEO practices or fixing optimization problems, specifically for wordpress.org blogs, would be greatly appreciated. Thanks!
On-Page Optimization | | prospects1 -
Duplicate Page Titles?
I'm running a campaign report within SEOmoz & am getting 9 pages that appear on this report. They all happen to be our author pages www.example.com//author/admin We have multiple authors. Is there a proper way that I should take care of this? Also as a side note, I'm using Yoast Wordpress SEO plugin, is there a setting on their I should change that will fix this issue? Or is it an issue at all? Thanks, BJ
On-Page Optimization | | seointern0 -
Main Page title change.
Hi, For some reason every week or two I am changing the title tag of my main page. Each change takes place because I find new version better than the old one. Does this have any impact on my SEO results (I'm keeping the main keywords each time) ? If it has an impact is it positive or negative ? And should I stick to one title and not change it under any circumstances for long periods of time ? Thanks!
On-Page Optimization | | lolskizz0