Does it matter <strong>
in <em>
<p><strong><em>Some text</em></strong></p>
or <em>
in <strong>
?
<p><em><strong>Some text</strong></em></p>
Which is semantically correct and more accessible?
Update:
How screen reader would behave in both situation?
The <strong> tag should be used to indicate strong importance, seriousness, or urgency, like to indicate key phrases in a text for someone skimming it. The <em> tag should be used to represent stress emphasis, like when you'd read the emphasized text in a different tone of voice.
While <em> is used to change the meaning of a sentence as spoken emphasis does ("I love carrots" vs. "I love carrots"), <strong> is used to give portions of a sentence added importance (e.g., "Warning!
General consensus is that 'em' and 'strong' should be used as they indicate semantic meaning (i.e. 'This text or word is more important than the others') as well as how the text should look (i.e. 'This word should be bold or italic'), whereas 'b'and 'i' only do the latter.
<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.
Syntactically correct but not semantically correct. <strong>
is an "higher order" form, so to speak, of <em>
. If you're looking for the effect of <b>
and <i>
, use CSS. Remember to not choose elements because of how they look but what they mean.
Both ways you have listed are perfectly correct markup-wise, as long as you're not mixing up the order of the closing tags. This would be incorrect:
<p><em><strong>Some text</em></strong></p>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With