Full-time web dev; JS lover since 2002; CSS fanatic. #CSSIsAwesome
I try to stay up with new web platform features. Web feature you don't understand? Tell me! I'll write an article!
He/him
Hooray for semantic tags! I have to say though, I've never been quite clear on when to use <mark> vs <em> vs <strong>. I guess <mark> is meant for cases where you're highlighting text for some reason other than emphasis, but it's not super clear
Yup, that's how I think of it too. Use <mark> to highlight text. But I get what you're saying. It can be confusing which appropriate tag to use in which case since it's always a bit subjective. I guess the way I approach it, don't overthink it too much and just pick the one that YOU think it's best. I know, it's not the best advice π But know this, at least your site won't break if you accidentally use the wrong one. So pick one and if it doesn't seem right, always okay to change it π
Full-time web dev; JS lover since 2002; CSS fanatic. #CSSIsAwesome
I try to stay up with new web platform features. Web feature you don't understand? Tell me! I'll write an article!
He/him
I found this SO answer that I think gives a pretty good explanation of the semantic differences, though some examples would be helpful: stackoverflow.com/a/14741437/470925
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hooray for semantic tags! I have to say though, I've never been quite clear on when to use
<mark>
vs<em>
vs<strong>
. I guess<mark>
is meant for cases where you're highlighting text for some reason other than emphasis, but it's not super clearYup, that's how I think of it too. Use
<mark>
to highlight text. But I get what you're saying. It can be confusing which appropriate tag to use in which case since it's always a bit subjective. I guess the way I approach it, don't overthink it too much and just pick the one that YOU think it's best. I know, it's not the best advice π But know this, at least your site won't break if you accidentally use the wrong one. So pick one and if it doesn't seem right, always okay to change it πI found this SO answer that I think gives a pretty good explanation of the semantic differences, though some examples would be helpful: stackoverflow.com/a/14741437/470925