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. Web Design
    4. Other tags inside an H1 tag

    Other tags inside an H1 tag

    Web Design
    4 4 32.6k
    • 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.
    • EscaladeSports
      EscaladeSports last edited by

      So I have a situation with the website I'm currently redesigning where the H1 titles are supposed to mix colors per the current brand strategy.

      The branding crew is adamant that this has to be done so there is no use in saying "just don't do it".

      To accomplish this I'm wrapping the words that need to be the other color in a .

      Additionally, some pages have a "sub text" as part of the title, floated to the right and in a smaller font but with the same multi color treatment. I'm wondering if the sub text should be in an H2 and positioned to the right or if it would be beneficial to have the text in the H1 as well.

      An example of what I'm talking about would be something like this: "Big Shoes for Big Guys - Nike Shoes"

      In that, the "Big Shoes" and "Nike" would be one color and the "for Big Guys" and "Shoes" would be another. I can imagine having the "Nike Shoes" as part of the H1 would be a good idea in some respect but I'm not certain of that.

      In order to make that happen I can only think of one way to do it:

      -H1-
      Big Shoes
      -span- for Big Guys -/span-
      -div- Nike
      -span- Shoes -/span-
      -/div-
      -/H1-

      So that brings me back to the original concern, do search engines care about tags inside the H1?

      The only other way to accomplish the color changes that I can think of would be to have a fairly large chunk of javascript setup to go through H1's to colorize them using the span tags. That is unless GoogleBot has started to execute javascript while crawling the sites now...

      1 Reply Last reply Reply Quote 1
      • Johnny4B
        Johnny4B last edited by

        To answer your question, a span tag within a H1 tag will not have any negative effect, its quite normal to use markup to add visualize appearance, and a span tag is not  "semantic" markup.

        Once you are not splitting up the word, as is using

        Nike

        , I have read that the robots would read that as N "space" ike ... hence not the word nike

        BTW, thats a very crude and unsemanctic way to style that phrase, why the div within the H1 tag

        I would use a below, without having the benefit of seeing your website layout of course

        Big Shoes for Big Guys

        Nike Shoes

        Then add your markup and styling within the the classes

        If you need anymore help with the styling, give me a shout

        Regards

        John

        1 Reply Last reply Reply Quote 2
        • TakeshiYoung
          TakeshiYoung last edited by

          It's fine to include tags withing an

          , but including awithin an

          goes against HTML conventions.

          1 Reply Last reply Reply Quote 2
          • jonmifsud
            jonmifsud last edited by

            I tend to use this quite a lot; It does not harm Search Engines, what is important is that only inline elements are contained within an H1 tag, that is span is a perfectly valid element, however a div is not. In your case you should use multiple spans with separate class names.

            You should also consider splitting it into H1 / H2 depending on your site structure and navigation as it might make more sense in some cases.

            1 Reply Last reply Reply Quote 1
            • 1 / 1
            • First post
              Last post
            • Have Your Thoughts Changed Regarding Canonical Tag Best Practice for Pagination? - Google Ignoring rel= Next/Prev Tagging
              Mat_C
              Mat_C
              1
              3
              76

            • Multiple H1 Tags for different section on one webpage in HTML5 Website? Should I have only one?
              georgehal
              georgehal
              0
              4
              10.3k

            • Does anyone have data on the effect of multiple H1 tags on a page?
              DirkC
              DirkC
              0
              2
              154

            • Is placing an H1 tag below a slideshow a bad practice?
              DSM_UK
              DSM_UK
              0
              2
              1.1k

            • Script tags and seo
              KristinaKledzik
              KristinaKledzik
              0
              6
              1.8k

            • Changing H1 Tag based on referrer
              mytouchoftech
              mytouchoftech
              0
              5
              524

            • Missing Meta Description Tag - Wordpress Tag
              jonnyholt
              jonnyholt
              0
              6
              6.0k

            • H1 Tags with Location
              kchandler
              kchandler
              0
              3
              898

            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