SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    get into it! bigduke's Avatar
    Join Date
    May 2004
    Location
    Australia
    Posts
    847
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    <strong> and <b> aren't same ?

    according to the W3C accessibility guideline the element STRONG is supposed to be a structrue element and B is supposed to be a presentation element. Aren't they the same and therefore presentation elements? or is it just how the browsers render <strong> that makes it "look" like a presentation element?

  2. #2
    SitePoint Wizard bronze trophy hooperman's Avatar
    Join Date
    Jan 2006
    Location
    Manchester, UK
    Posts
    4,301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    They're not the same. 'Strong' relates to the meaning you are giving to html elements, whereas you could be bolding elements for any reason.

    You would apply <strong> to something you wanted to stress, but you might apply <b> purely for presentation reasons.

  3. #3
    SitePoint Evangelist tetsuo shima's Avatar
    Join Date
    Oct 2005
    Location
    Switzerland
    Posts
    597
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    the <strong> tag is used for emphasis, just like the <em> tag. No matter how you want your output to look like (I'm talking style here), you use these tags to emphasize one or more words. If you just want a portion of your text to be bold, then you can use the <b> tag, which is very acceptable. You can also go the CSS way and style a <span> tag:

    Code:
    .bold{
        font-weight:bold;
    }
    Code:
    <span class="bold">some words</span>
    The SEO Faq thread
    Dependency injection made easy: Phemto

  4. #4
    get into it! bigduke's Avatar
    Join Date
    May 2004
    Location
    Australia
    Posts
    847
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so how does emphasizing affect content other than the rendering in the browser ? The screen readers lay more stress on this and perhaps even some SEO repercussions ?

  5. #5
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A visual user agent may choose to represent <strong> by using a red background. It doesn't have to be bold.

    An aural user agent (or some assistive technology on top of a browser, e.g., a screen reader) can 'render' <strong> by slowing down the speed of reading and/or increasing the volume. How do you 'render' <b> in speech?
    Birnam wood is come to Dunsinane

  6. #6
    SitePoint Addict
    Join Date
    Jan 2002
    Location
    Southwest Florida
    Posts
    393
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, the main difference is for non-visual user-agents, such as screenreaders. A screenreader would completely ignore <b>, because it's presentational only, while a screenreader would (ideally) somehow emphasize <strong> because it's, well, strong.

    Virtually every visual browser boldfaces <strong>, but there's nothing in the html spec defining that. A visual browser could make <strong> royal purple all uppercase, while <b> always means bold, regardless.

    And of course you can use css to style either of those tags however you want. Just bear in mind that non-visual user-agents will only pay attention to strong, and not to b. In theory, anyway.

  7. #7
    SitePoint Evangelist tetsuo shima's Avatar
    Join Date
    Oct 2005
    Location
    Switzerland
    Posts
    597
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bigduke
    so how does emphasizing affect content other than the rendering in the browser ? The screen readers lay more stress on this and perhaps even some SEO repercussions ?
    Words emphasized have more weight SEO wise. If you have a page optmized for some keywords, the <strong> and <em> tags are two tags you definitly wanna use around these keywords. Same goes for <hx> tags btw.

    The SEO Faq thread
    Dependency injection made easy: Phemto

  8. #8
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Well, yes but that could be considered abusing semantics if you just littered the page with structural emphasis for the sake of trying to gain better SEO.

  9. #9
    get into it! bigduke's Avatar
    Join Date
    May 2004
    Location
    Australia
    Posts
    847
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you so much for all your insight chaps ... really appreciate it

  10. #10
    SitePoint Evangelist tetsuo shima's Avatar
    Join Date
    Oct 2005
    Location
    Switzerland
    Posts
    597
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by xhtmlcoder
    Well, yes but that could be considered abusing semantics if you just littered the page with structural emphasis for the sake of trying to gain better SEO.
    Of course!

    The SEO Faq thread
    Dependency injection made easy: Phemto


Bookmarks

Posting Permissions

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