SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,757
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    <em> vs. <strong>

    What is the difference between <em> and <strong> ??


    And do you agree or disagree with this from StackOverflow:

    <strong> is a tag you'd put around a sentence or phrase to indicate that "this is more important than the surrounding text".

    <em> is generally used to indicate the stress of a word within a sentence.

    Debbie

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,112
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    As far as I can tell, they play pretty much the same role. They emphasise text. The default rendering of <strong> is bold text and the default for <em> is italic, so which one I use depends on whether I would use bold or italics if I were writing for print.

    IMHO, the StackOverflow distinction is an overly ambitious attempt to draw a distinction that isn't there ... although it does seem consistent with the examples presented in the SitePoint Ref:

    Strong: http://reference.sitepoint.com/html/strong

    Em: http://reference.sitepoint.com/html/em

    I guess if that distinction works for you, then go with that. Personally, I don't think I will. If I would use italics for a group of words in print, I would use <em> on the web to indicate the emphasis on all of those words.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  3. #3
    SitePoint Member
    Join Date
    Nov 2011
    Location
    USA
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Red face

    <em> and <strong> have remained pretty much the same, there has been a slight realignment in their meanings.

    In HTML4 they meant ‘emphasis’ and ‘strong emphasis’. Now their meanings have been differentiated into <em> representing stress emphasis (i.e., something you’d pronounce differently), and <strong> representing importance.

  4. #4
    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)
    Like I previously stated: http://www.sitepoint.com/forums/show...=1#post4984982 less than 14 days ago.

  5. #5
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,757
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by xhtmlcoder View Post
    Like I previously stated: http://www.sitepoint.com/forums/show...=1#post4984982 less than 14 days ago.
    And like I said yesterday...

    What do you think about how they explained it on Stack Overflow?

    (The emphasis there is also on *how many words* apply...)


    Debbie

  6. #6
    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)
    The Stack Overflow answer is mainly irrelevant; since it is actually relating to HTML5, which is not a fully normative markup language unlike HTML 4.01 thus you cannot compare the two... other than HTML 4.01 actually is a recommendation and supported by legacy browsers.

    It may have helped if originally it was made clear as mud you were after the Fred5 draft reformulation or to which markup you were attempting to apply it to because that then determines as to whether the #1 quoted text has any value or nought!

    However, let's for one moment assume for hypothetical idiocies sake we were talking Fred (#1) then under those conditions; EM would be 'stress emphasis' and 'changes the meaning' whereas STRONG would be 'strong importance' and 'does not change the meaning'.

    In which case my answer #4 is still fully correct and only in context (of a differing draft) would #1 be of any value.

  7. #7
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,757
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by xhtmlcoder View Post
    The Stack Overflow answer is mainly irrelevant; since it is actually relating to HTML5, which is not a fully normative markup language unlike HTML 4.01 thus you cannot compare the two... other than HTML 4.01 actually is a recommendation and supported by legacy browsers.

    It may have helped if originally it was made clear as mud you were after the Fred5 draft reformulation or to which markup you were attempting to apply it to because that then determines as to whether the #1 quoted text has any value or nought!

    However, let's for one moment assume for hypothetical idiocies sake we were talking Fred (#1) then under those conditions; EM would be 'stress emphasis' and 'changes the meaning' whereas STRONG would be 'strong importance' and 'does not change the meaning'.

    In which case my answer #4 is still fully correct and only in context (of a differing draft) would #1 be of any value.
    Who is Fred?


    Debbie

  8. #8
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,112
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by DoubleDee View Post
    Who is Fred?
    Earlier this year there was a discussion about the 5 being removed from "HTML5", and somehow out of that discussion arose the suggestion that HTML5 should be called "Fred". I think xhtmlcoder is fixated on it because he's desperate not to have to change his username to html5coder. (Mind you, it sounds better than Fredcoder to me.)
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  9. #9
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,271
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    What do you think about how they explained it on Stack Overflow?
    It would matter if any computer, browser, assistive technology or anything else actually made a distinction between those tags and any regular plain old ordinary text, but nobody does.

    They're great fun to argue about, but as far as web pages go, you can say em is venus and strong is from mars and it would all be good.

  10. #10
    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)
    Off Topic:

    Ralph, I wouldn't need to change my username I don't use such non normative markup plus the five is officially dead but FredCoder sounds like some real retro dark horse! Far more awesome than htm5coder or html5 anything... in the URL.

  11. #11
    Life is not a malfunction gold trophysilver trophybronze trophy
    TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    6,085
    Mentioned
    255 Post(s)
    Tagged
    5 Thread(s)
    Quote Originally Posted by xhtmlcoder View Post
    Off Topic:

    Ralph, I wouldn't need to change my username I don't use such non normative markup plus the five is officially dead but FredCoder sounds like some real retro dark horse!
    Off Topic:

    As long as I don't have to change my name to FredBear...


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
  •