Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 664
Jitendra Vyas Avatar asked Dec 20 '09 20:12

Jitendra Vyas


People also ask

What is the difference between strong B tag and em I tag?

The main difference between these two tag is that the strong tag semantically emphasizes on the important word or section of words while the bold tag is just offset text conventionally styled in bold. Below is the code to show this difference. Example 1: HTML.

What is the difference between em and I tag?

By default, the visual result is the same. The main difference between these two tag is that the <em> tag semantically emphasizes on the important word or section of words while <i> tag is just offset text conventionally styled in italic to show alternative mood or voice.

What are em tags?

Definition and Usage The <em> tag is used to define emphasized text. The content inside is typically displayed in italic. A screen reader will pronounce the words in <em> with an emphasis, using verbal stress.

What is strong tag?

The <strong> tag is used to define text with strong importance. The content inside is typically displayed in bold. Tip: Use the <b> tag to specify bold text without any extra importance!


2 Answers

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.

like image 76
bobince Avatar answered Oct 19 '22 17:10

bobince


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

like image 33
Alohci Avatar answered Oct 19 '22 19:10

Alohci