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.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Jan 2004
    Location
    Australia
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS and bold use

    Keeping in tune with the whole CSS thing is bold <b></b> the best way to go about bolding a slection of text within a paragraph?

  • #2
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    You probably don't want specifically bold text, you want to emphasise a word. The em element stands for emphasis, and the strong element stands for strong emphasis. The em element defaults to italic style, the strong element defaults to bold. Use the one that is semantically most appropriate of them, versus i or b elements.
    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
    New Coder
    Join Date
    Jan 2004
    Location
    Australia
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks very much for your help. I assume then that the em and strong tags can also have CSS applied to yield whatever format of emphasis you like?

  • #4
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Yeah you can.
    OracleGuy

  • #5
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    But, if you're emphasising it to be a header, use <h1> to <h6> instead.
    David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
    W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Also keep in mind the symantic tags like "abbr", "acronym", "address" and "cite". If the text you want to emphasize is any of those you should use the appropriate tag and not just a generic tag like strong or em.
    Check out the Forum Search. It's the short path to getting great results from this forum.


  •  

    Posting Permissions

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