www.webdeveloper.com
Results 1 to 4 of 4

Thread: [RESOLVED] strong tag vs span tag to bold text

  1. #1
    Join Date
    Nov 2008
    Location
    Niagara Falls, Canada
    Posts
    356

    resolved [RESOLVED] strong tag vs span tag to bold text

    Is there any advantage to using <strong> tag in the HTML to bold a keyword in the page content as opposed to using a <span> tag in the CSS to bold the keyword?

    <strong>keyword</strong>
    ----------------------------------------
    <span>keyword</span>
    span {font-weight:bold;}

    Do both methods hold the same weight when Google crawls the site?

  2. #2
    Join Date
    Nov 2010
    Location
    Los Angeles, CA
    Posts
    234
    the strong tag was meant for strong text which in most cases means bolder text. The span tag is just a generic inline tag which can be used for multiple purposes, just as a div tag can be used for multiple block element types such as a container or a paragraph of text. I say use the strong tag because that's its intended purpose. This is similar to the HTML5 philosophy. A div tag is too generic to describe everything so that's why there's now a <header>, <section>, <nav>, and <footer> elements. Sure a <div> tag can get the job done fine but it's not as semantic.

    Let me put it this way. You would want all strong tags to be bold, but you wouldn't want all span tags to be bold.

    As far as SEO goes it shouldn't make much of a difference but if it does, the strong tag would be better.

  3. #3
    Join Date
    Nov 2008
    Location
    Niagara Falls, Canada
    Posts
    356
    Thanks for the reply. Makes sense. Much appreciated

  4. #4
    Join Date
    Dec 2010
    Posts
    36
    Quote Originally Posted by Big O(1) View Post
    Let me put it this way. You would want all strong tags to be bold, but you wouldn't want all span tags to be bold.
    That's why I ID or class the spans to CSS them.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles