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. H1 tag optimization question

    H1 tag optimization question

    Web Design
    4 4 427
    • 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.
    • irvingw
      irvingw last edited by

      Hey folks, I've got a question about h1 coding.

      Our H1 tags are currently coded like this:

      [http://www.rapitup.com/mf-doom](<a href=)" class=" current">MF Doom

      Do you think this would be better?

      [http://www.rapitup.com/mf-doom](<a href=)" class=" current">

      MF Doom

      My guess is that the second example would be better, and even if not better we know it's not worse. Thoughts? Thanks!

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

        Don't think there is a difference SEO-wise, just styling wise (inner tag style would override the outer tags style).

        I would like some second opinions though.

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

          I wasn't sure of the answer, but I found someone with a similar one in another forum.

          General consensus seemed to be that if you're using HTML5, it doesn't matter, if you're not using HTML5, you should use the first instance.

          Here's the link: http://webmasters.stackexchange.com/questions/20446/anchor-tag-inside-h1-or-h1-inside-achor-tag-which-is-better

          Hope it works out for you!

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

            HTML 5 doesn't care which way you do it, but the 2nd way is invalid in XHTML or HTML 4.  I prefer the first way, since it looks cleaner (to me) in the code, and there is less chance of a broken tag (if someone misses a < or >) trashing the link completely.

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            • Multiple H1 Tags for different section on one webpage in HTML5 Website? Should I have only one?
              georgehal
              georgehal
              0
              4
              10.3k

            • A question about title tag when the page has 2 services.
              Raymondlee
              Raymondlee
              0
              6
              95

            • H1 tag within on top nav but css class styled appear at bottom
              Envoke-Marketing
              Envoke-Marketing
              0
              2
              59

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

            • Wordpress Site Structure and H1 Tags
              evolvingSEO
              evolvingSEO
              0
              9
              350

            • Other tags inside an H1 tag
              jonmifsud
              jonmifsud
              1
              4
              32.6k

            • H1 image replacement question
              jgower
              jgower
              0
              6
              4.0k

            • H1 Tag, necessary or not? Hidden or not?
              BMDM
              BMDM
              0
              6
              3.6k

            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