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
-
I have updated title 4 days ago but still still showing old title and description on Google serps, How to resolve it?
I have updated the title tag but not showing, Please have look at the view source for this website- https://m.yolobus.in/ I want to show this title and description- <title>Online Bus Ticket Booking | YoloBus India</title> But showing the wrong title and description on google SERP- Title - YoloBus :: Home Description - Delhi Lucknow; Lucknow Delhi; Delhi Gorakhpur; Varanasi Lucknow; Gorakhpur Delhi; Delhi Delhi; Bangalore Bangalore; Manali Manali; Chennai Chennai 7mHsdmu
On-Page Optimization | | AnkitS.19900 -
Hi - How do you get rid of duplicate content that was accidentally created on a tag url? For example, when I published a new article, the content was duplicated on: /posts/tag/lead-generation/
the original article was created with: /posts/shippers-looking-for-freight-brokers/ How can I fix this so a new URL is not created every time I add a tag to a new posting?
On-Page Optimization | | treetopgrowthstrategy0 -
Meta Description
Hey folks, I'm having a little problem with meta description. https://www.google.com/search?q=SSl-5+duncan&oq=SSl-5+duncan+&aqs=chrome..69i57j0l5.3486j0j4&sourceid=chrome&es_sm=91&ie=UTF-8 If you look at that first result it looks like this: Custom Staggered Strat | Seymour Duncan <cite class="_Rm">www.seymourduncan.com/pickup/custom-staggered-strat</cite>Custom Staggered Strat SSL-5. Home; / Pickups ... Maserati tribute - Fender Stratocaster with seymour duncan ssl 5 ... Talk Tone @seymourduncanpickups ...Even while the meta description code is this:name="description" itemprop="description" content="The ultimate overwound Strat single coil pickup, found in the bridge position of the David Gilmour Signature Fender Stratocaster." />We are seeing the same issue here in many places:https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=seymour duncan blogUsing the All In One SEO Pack - Any suggestions as to what might be causing this or how to fix it?
On-Page Optimization | | ScottOlson0 -
Duplicate Page Title
I have a dating site, it's got a lot of duplicate page titles, most of them are the language buttons for the users to view the site in there language. but I think it's obvious that the buttons don't have anything to do with it. I'm thinking that page tittle is basically a description of what the site is. like for an example "online-dating" is this it? please tell me in terms for a dummy, how to fix it.
On-Page Optimization | | clickit2getwithit0 -
How long does it take Google to index new title tags and meta descriptions?
Hi, I have launched a website ( www.bookkeepingking.com )and would like Google to reflect the latest title tag changes in its results. How long does it typically take to happen? I believe this might be one reason why the site may not be generating any search traffic yet, even though I haven't yet begun any link building yet. A couple of notes: When I enter site:bookkeepingking.com in the search box, the pages show up, but with the old/default title and meta descriptions. I am using the Yoast for SEO plugin I have resubmitted the XML map - Yoast created 2... /page-sitemap.xml and /post-sitemap.xml The changes were made about 1 week ago. WMT says that there are zero errors. Is there something I may have missed? Or do I just need to give it more time? Thanks in advance for your help. Erin
On-Page Optimization | | HiddenPeak0 -
My report indicated that I have 340 crawl warnings. Not sure how to fix them. Please provide links on where I need to go to fix them.
My report indicated that I have 340 crawl warnings. Not sure how to fix them. Please provide links on where I need to go to fix them. http://pro.seomoz.org/campaigns/95663/issues#notice-issues
On-Page Optimization | | cyaindc0 -
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 -
Title Keyword Question
I'm writing up keywords for new pages on a website. There are a number of variations on the way we can say what we're looking for, and I don't want to post the specific keywords but I'll give an example using fruits. Let's say I want to optimize for Granny Smith apples, McIntosh apples, Jonathan apples, etc. Could my title be Apples - Granny Smith, McIntosh, Jonathan and my page will come up when someone searchs "Granny Smith apples" or "McIntosh apples" etc. or do the words have to be repeated in order. Obviously I will also be repeating these in the description and on the page I'm optimizing. Thanks!
On-Page Optimization | | crlana0