Whitespace INSIDE # tag harmful?
-
Hi,
I understand that 'whitespace' in source code is absolutely fine and is stripped out. For example the following code is fine:
Red Apples
some text
However, how is whitespace interpreted INSIDE html tags such as H1's? My Dev team have instructions to add H1's to a page, however they have done so like this:
Red Apples
(37 characters long)
rather than this:
Red Apples
(10 characters long)
Do you think this extra space will be harmful? The browser renders it fine, however if you use something like the mozbar plugin is shows the H1 length as 37 characters.
I know the 10 character H1 is 100% relevant to the search term "Red Apples", however is the 37 character H1 only 27% relevant? (10/37)
I've made the request to the Dev team to remove this whitespace because I'd rather err on the side of caution, but its been knocked back because the HTML spec specifies consecutive white-space should be interpreted as a single space and all browsers build the DOM by trimming a tags value - and they imagine search bots do the same so don't want to mess with the compiler.
Anyone have experience of this? I've never had whitespace in a H1 before so don't know. Happy to leave the whitespace in if it's not going to be an issue.
Thanks in advance
-
Thanks Lewis. I think this video is commenting more about whitespace outside tags than inside them, but I think the same principle applies.
Unless I hear that it does cause issues, for now I'll leave it in and fight other battles with the dev team.
Thanks
-
Although its from a few years ago this video from Matt Cutts seems to suggest that there wouldn't be an issue...
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
-
Product meta tags are not updating in my Magneto website!
I need some help! For some reason, each time I update the product meta tags in my Magento website, it doesn't change on the current website? Could someone help me understand why that is?
Technical SEO | | One2OneDigital0 -
Webmaster > HTML Improvements > Duplicate title tags
Hi, Webmaster > HTML Improvements > Duplicate title tags shows as in screenshot. How can i set this right as its a single page which duplicates? http://imgur.com/mjB0xZS Regards
Technical SEO | | mtthompsons0 -
Do I need both canonical meta tags AND 301 redirects?
I implemented a 301 redirect set to the "www" version in the .htaccess (apache server) file and my logs are DOWN 30-40%! I have to be doing something wrong! AddType application/x-httpd-php .html .htm RewriteCond %{HTTP_HOST} ^luckygemstones.com
Technical SEO | | spkcp111
RewriteRule (.*) http://www.luckygemstones.com/$1 [R=301,L] RewriteCond %{THE_REQUEST} ^./index.htm
RewriteRule ^(.)index.htm$ http://www.luckygemstones.com/$1 [R=301,L] IndexIgnore *
ErrorDocument 404 http://www.luckygemstones.com/page-not-found.htm
ErrorDocument 500 http://www.luckygemstones.com/internal-serv-error.htm
ErrorDocument 403 http://www.luckygemstones.com/forbidden-request.htm
ErrorDocument 401 http://www.luckygemstones.com/not-authorized.htm I've also started adding canoncial META's to EACH page: I'm using HMTL 4.0 loose still--1000's of pages--painful to convert to HTML5 so I left the / off the tag so it would validate. Am I doing something wrong? Thanks, Kathleen0 -
Duplicate Title Tags and Meta Desc even with the correct Canonical Tag
I show a large/growing number of duplicate title tags and duplicate meta descriptions in my webmaster tools. I look at both pages Link 1 - http://www.thatsmytopper.com/wedding-cake-toppers/theme-cake-toppers/beach-theme-cake-toppers/where/color/petal-pink.html Link 2 - http://www.thatsmytopper.com/wedding-cake-toppers/theme-cake-toppers/beach-theme-cake-toppers/where/color/petal-pink/limit/16.html Both pages have the following canonical url: <link rel="<a class="attribute-value">canonical</a>" href="http://www.thatsmytopper.com/wedding-cake-toppers/theme-cake-toppers/beach-theme-cake-toppers.html" > Why does this show up as a duplicate title tag and description to Google still?
Technical SEO | | bhalverson0 -
Canonical tags pointing at old URLs that have been 301'd
I have a site which has various white label sites with the same content on each. I have canonical tags on the white label sites pointing to the main site. I have changed some URLs on the main site and 301'd the previous URL to the new ones. Is it ok to have the canonicals pointing to the old URLs that now have a 301 redirect on them.
Technical SEO | | BeattieGroup0 -
Should I use these Meta Tags or Remove it?
Hi, I have a lot of older pages that I am cleaning up older pages, and I see that I have <title>Actual Title</title> (I understand the importance of this tag.) (I have some text in this meta tag on a lot of pages, sometimes matching my title tag exactly but in some cases I treated it like a mini description. Should I remove the on my pages, or keep it and make sure it is the exact as the main Title Tag. -------- Question about meta tag #2. I have heard rumors that the keywords tag should be removed. example: Thanks in advance! Force7
Technical SEO | | Force70 -
Can somebody explain Canonical tags and the technical elements of SEO?
Newbie here,and learning fast. But... I can't help but feel the technical elements of SEO (i.e. canonical tags, javascript amongst others) are holding me back. My knowledge of programming and coding is basic at best. Do I have to have an understanding of this to get ahead in SEO or is it simply a case of reading some more and knowing the techniques? What percentage of SEO is technical (e.g. html coding etc...) Thanks in advance. N. p.s. could someone explain what canonical tags are?
Technical SEO | | Buzzwords0 -
Canonical tag in preferred and duplicate page
Hi, I have a super spiffy (not) CMS that tends to create some pages at the root level of the site (not where I want it) i.e. www.site.com/page.htm as well as the desired location i.e. www.site.com/category/keyword/page.htm . Now obviously a canonical tag inserted into the URL at the undesired location would be the best option, however the source code is exactly the same for both pages (can’t change this) i.e. if I put the canonical tag that reads www.site.com/category/keyword/page.htm"/> it will appear in the head section of both pages, the desired URL and the non desired URL. Will a canonical tag inserted into the head section of a the preferred URL directing the search engine spiders pretty much to itself cause more grieft than the solution it offers re duplicate content ? Marc
Technical SEO | | NRMA0