+ 2
Confusing tags of HTML !!
What is the difference between <b> & <strong> tag. There are also some other tags that works same; like - "<ins> & <u>", "<del> & <s>", "<i> & <em>" But why there was need to create two tags that works same ? And which of them are better ?
6 Réponses
+ 13
Semantic HTML introduced new tags that focused on describing what the text means rather than what it looks like. So <strong> replaces <b> because the new tag doesn't describe the format of the text. Now, it won't be strange if strong doesn't mean bold anymore. Rather, it could be underlined and italics via CSS without having to change the tag to fit the format.
The tags describing format should be avoided. They have been around for many years and should be deprecated at some point.
+ 11
you can read about web accessibility also. Interesting too
+ 8
emphasize, blue
+ 6
well <b> and <strong> works same but
<b> is used to make Text bold and
<strong> is used to mark a text as important,We see this tag do Same works but browser understand this <strong> code as mark either then bold
and goes Same for others
+ 5
<strong> makes a text BOLD and important, whereas
<em> makes a text ITALIC and important.
Edit: @4rontender, in terms of output, italic and emphasize have the same sense 😅
But, in literal terms, <em> makes text emphasized and <i> makes text italic as marked by @4rontender :)
+ 1
But, if the <em> tag also mark a text as important then is there any difference between <strong> & <em> ?