The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Technical SEO Issues
    4. Whitespace INSIDE # tag harmful?

    Whitespace INSIDE # tag harmful?

    Technical SEO Issues
    3 2 671
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • FashionLux
      FashionLux last edited by

      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

      1 Reply Last reply Reply Quote 0
      • CPU
        CPU last edited by

        Although its from a few years ago this video from Matt Cutts seems to suggest that there wouldn't be an issue...

        watch?feature=player_embedded&v=u55Rn1mYgO8

        FashionLux 1 Reply Last reply Reply Quote 0
        • FashionLux
          FashionLux @CPU last edited by

          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

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          • Pages being flagged in Search Console as having a "no-index" tag, do not have a meta robots tag??
            Keszi
            Keszi
            0
            2
            84

          • H1 Tags the same as Title Tags and other meta questions
            Houses
            Houses
            0
            3
            629

          • Duplicate Title Tags How harmful is it?
            GlobeRunner
            GlobeRunner
            0
            2
            2.0k

          • Do H2 tags carry more weight than h4 tags?
            evolvingSEO
            evolvingSEO
            0
            3
            1.3k

          • "Standout" tag and "Original content" tags - what's the latest?
            BrianCrouch
            BrianCrouch
            0
            2
            423

          • One H1 tag Dead Long Live multiple H1 tags?
            irvingw
            irvingw
            0
            4
            2.7k

          • I use All in one SEO pack for wordpress and i i have 2 meta tags i need to delete them is this the meta description tag ?
            mad2k
            mad2k
            0
            2
            415

          • Google showing former meta tags in search results inspite of new tags being crawled by it
            sesertin
            sesertin
            0
            3
            558

          Get started with Moz Pro!

          Unlock the power of advanced SEO tools and data-driven insights.

          Start my free trial
          Products
          • Moz Pro
          • Moz Local
          • Moz API
          • Moz Data
          • STAT
          • Product Updates
          Moz Solutions
          • SMB Solutions
          • Agency Solutions
          • Enterprise Solutions
          • Digital Marketers
          Free SEO Tools
          • Domain Authority Checker
          • Link Explorer
          • Keyword Explorer
          • Competitive Research
          • Brand Authority Checker
          • Local Citation Checker
          • MozBar Extension
          • MozCast
          Resources
          • Blog
          • SEO Learning Center
          • Help Hub
          • Beginner's Guide to SEO
          • How-to Guides
          • Moz Academy
          • API Docs
          About Moz
          • About
          • Team
          • Careers
          • Contact
          Why Moz
          • Case Studies
          • Testimonials
          Get Involved
          • Become an Affiliate
          • MozCon
          • Webinars
          • Practical Marketer Series
          • MozPod
          Connect with us

          Contact the Help team

          Join our newsletter
          Moz logo
          © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
          • Accessibility
          • Terms of Use
          • Privacy