Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 19

Thread: quick question

  1. #1
    Regular Coder
    Join Date
    Jan 2004
    Location
    London, UK
    Posts
    234
    Thanks
    0
    Thanked 0 Times in 0 Posts

    quick question

    why have read that <strong> tags are better than a <b>? dont they act the same way? same for <em> and <i> etc

  • #2
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Well, the reason is one of semantics. The default style is the same, but the meaning is different, and you should mark your document up according to the meaning, not the style. Em means emphasis, strong means strong emphasis. B means bold type, i means italics. Thus, em and strong have meaning aside the visual presentation, while b and i haven't.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #3
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Also make sure you read our posting guidelines on naming threads appropriately.

    Something like "Why is <strong> better than <b>?" would be better than "quick question." It makes it easier when people search the forum or just plain look at new threads to find ones they can answer.
    OracleGuy

  • #4
    Regular Coder
    Join Date
    Nov 2002
    Posts
    672
    Thanks
    1
    Thanked 1 Time in 1 Post
    I've never seen <strong> used on a page., but I learned it at the same time as the <b> tag. To me, it's more or less just an alias. It's beyond me why <strong> wasn't a target for being depricated when more widely used tags were.

  • #5
    Senior Coder
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    1,963
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It's beyond me why <strong> wasn't a target for being depricated when more widely used tags were.
    Read the first response to this post.
    Semantics are why meaningless and/or presentation tags are being deprecated.
    Did you even read the whole thread before posting?

    I take no responsibility for the above nonsense.


    Left Justified

  • #6
    Regular Coder
    Join Date
    Nov 2002
    Posts
    672
    Thanks
    1
    Thanked 1 Time in 1 Post
    Originally posted by mindlessLemming
    Read the first response to this post.
    Semantics are why meaningless and/or presentation tags are being deprecated.
    Did you even read the whole thread before posting?
    Yes, I did. But the result is still the same. No browser implements <b> and <strong> differently. One would have to search the source just to know if it was <b> or <strong>. Most people would have better things to do and it's easy to rely on something less irritating.

  • #7
    Senior Coder
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    1,963
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The one case where they would differ is when a user is accessing your page via a screen reader. The screen reader's voice would place strong emphasis on the words within a <strong> tag, but would not pronounce words within a <b> tag any differently.
    Or as is my understanding, tell me if I'm wrong here guys

    I take no responsibility for the above nonsense.


    Left Justified

  • #8
    Regular Coder
    Join Date
    Nov 2002
    Posts
    672
    Thanks
    1
    Thanked 1 Time in 1 Post
    Hmm, I never thought of that (I have no experience with mics and voice stuff). It may also be covered in CSS2 with the @media stuff.

  • #9
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    Also, some people prefer to emphasize certain words with bold text, other prefer to empahzise certain words with italics. And some, like me, change their mind all the time. But if I mark up a page semantically, then I would emphasize <em>certain words</em>.

    em {font-weight (or style):whatever I'm in the mood for}

    -Rich

  • #10
    Regular Coder
    Join Date
    Jan 2004
    Location
    London, UK
    Posts
    234
    Thanks
    0
    Thanked 0 Times in 0 Posts
    so lets say your title is in bold... the reader will read it wierd? like with emphasis? so then there its best to use <b>

  • #11
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Semantics again

    No, your title (I reckon you mean something of a header) would be in an hx (h1, h2, etc.) element, and the user agent (whichever that may be) can decide on this basis how the content should be expressed. Stop thinking looks, start thinking meaning; CSS can control what it looks/sounds/feels like (yes, there are braille terminals as well...).
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #12
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Ok, let me explain:
    Strong and em tell us something about the nature oif the content. B and i doesn't. What default style the browser applies to them is of no importance whatsoever, that style can be changed with a line of css. No, what matters is the meaning it implies for the contents. That's the reason you should use p for paragraphs instead of div. That's the reason you should use strong for text you want to emphasise instead of b. That's why you should use tables only for tabular data, not as a layout element. That's why you should use lists for linklists and page menus instead of sequences of a separated by br, or nested divs. That's why you shouldn't use the font tag.

    - In one word: Semantics.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #13
    Regular Coder
    Join Date
    Jan 2004
    Location
    London, UK
    Posts
    234
    Thanks
    0
    Thanked 0 Times in 0 Posts
    right, got it and yes i did mean header

  • #14
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    That's the point

    got it
    Great! Remember that however harsh we may be sometimes, we always mean the best by you!
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #15
    Senior Coder
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    1,963
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by liorean
    Ok, let me explain:
    Strong and em tell us something about the nature oif the content. B and i doesn't. What default style the browser applies to them is of no importance whatsoever, that style can be changed with a line of css. No, what matters is the meaning it implies for the contents. That's the reason you should use p for paragraphs instead of div. That's the reason you should use strong for text you want to emphasise instead of b. That's why you should use tables only for tabular data, not as a layout element. That's why you should use lists for linklists and page menus instead of sequences of a separated by br, or nested divs. That's why you shouldn't use the font tag.

    - In one word: Semantics.
    This should be copied into a sticky or something, so we can just link back to it in the future instead many different people trying to explain it.

    I take no responsibility for the above nonsense.


    Left Justified


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

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