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

HtmlXhtmlSemantics

Html Problem Overview


Both of them emphasize text. The <em> tag shows text as italics, whereas <strong> makes it bold. Is this the only difference?

Html Solutions


Solution 1 - Html

Yeah, the definition of what ‘strong emphasis’ is compared to just ‘emphasis’ is pretty woolly. The only standard definition would be “it's emphasised, but more!!”.

Personally I use <em> for normal emphasis where you'd read the emphasised word in a different tone of voice, and <strong> for that thing where you take key words and phrases to pick them out of the text to help people skimming the text pick out the subjects.

This isn't a standard interpretation, but it makes some sense and rendered appropriately by the default italic/bold styles. Whatever you do, be consistent.

Solution 2 - Html

<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.

For example:

> In spite of what some might say, there is a semantic difference between the elements.

For a clear distinction between stress emphasis and importance, and more examples, see the HTML 5 draft.

Solution 3 - Html

In HTML4:

EM indicates emphasis.

STRONG: Indicates stronger emphasis.

http://www.w3.org/TR/html4/struct/text.html#h-9.2.1

Solution 4 - Html

Note that the difference is going to change:

> In HTML 4.01, the <strong> tag defined > strong emphasized text, but in HTML 5 > it defines important text.

Doesn't make the issue any clearer, does it?

Solution 5 - Html

From the WHATWG's Living standard HTML spec:

> # The em element > > The em element represents stress emphasis of its contents. > > [...] > > The placement of stress emphasis changes the meaning of the sentence. The element thus forms an integral part of the content. The precise way in which stress is used in this way depends on the language. > > --- > Example > > These examples show how changing the stress emphasis changes the meaning. First, a general statement of fact, with no stress: > > Cats are cute animals. > > By emphasizing the first word, the statement implies that the kind of animal under discussion is in question (maybe someone is asserting that dogs are cute): >
>

Cats are cute animals.

> > Moving the stress to the verb, one highlights that the truth of the entire sentence is in question (maybe someone is saying cats are not cute): >
>

Cats are cute animals.

> > By moving it to the adjective, the exact nature of the cats is reasserted (maybe someone suggested cats were mean animals): >
>

Cats are cute animals.

> > Similarly, if someone asserted that cats were vegetables, someone correcting this might emphasise the last word: >
>

Cats are cute animals.

> > By emphasizing the entire sentence, it becomes clear that the speaker is fighting hard to get the point across. This kind of stress emphasis also typically affects the punctuation, hence the exclamation mark here. >
>

Cats are cute animals!

> > Anger mixed with emphasizing the cuteness could lead to markup such as: >
>

Cats are cute animals!

> --- > Note > > [...] > > The em element [...] isn't intended to convey importance; for that purpose, the strong element is more appropriate. > > --- > > [...] > # The strong element > > > The strong element represents strong importance, seriousness, or urgency for its contents. > [...] > In this example, the strong element is used to denote the part of the text that the user is intended to read first. > >

Welcome to Remy, the reminder system.

>

Your tasks for today:

>
    >
  • Turn off the oven.

  • >
  • Put out the trash.

  • >
  • Do the laundry.

  • >

Solution 6 - Html

em: Indicates emphasis.

strong: Indicates stronger emphasis.

Its effect in user accessibility tool (NVDA).

Its also effect in SEO.

Reference: https://www.w3.org/TR/html4/struct/text.html#h-9.2.1

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJitendra VyasView Question on Stackoverflow
Solution 1 - HtmlbobinceView Answer on Stackoverflow
Solution 2 - HtmlAlohciView Answer on Stackoverflow
Solution 3 - HtmlQuentinView Answer on Stackoverflow
Solution 4 - HtmlMichael BorgwardtView Answer on Stackoverflow
Solution 5 - HtmlalexrogersView Answer on Stackoverflow
Solution 6 - HtmlArman Hakim SagarView Answer on Stackoverflow