r/Frontend • • Oct 25 '18

You're using <em> wrong

https://logrocket.com/blog/youre-using-em-wrong
4 Upvotes

23 comments sorted by

15

u/natziel Oct 26 '18

<em><body>Everything I write is important</body></em>

13

u/digitallimit Oct 26 '18

I’m not using the em tag...

29

u/pingpong Oct 26 '18

The <em> tag is not for emphasis

glances at Mozilla's docs

<em>: The Emphasis element

Just because you wasted time writing this doesn't justify wasting our time by posting it

2

u/diiscotheque Oct 26 '18

Did you read the rest of the post? To me it sounds like semantic perfectionism, but he’s not wrong I think.

4

u/pingpong Oct 26 '18

What kind of emphasis isn't stress emphasis? None of the examples he gave are examples of emphasis that is not stress emphasis. That's because they are the same thing

2

u/diiscotheque Oct 26 '18

Right. Seems like he has no explanation for what he thinks “regular” emphasis is.

1

u/unfaltermusic Oct 26 '18

<em>regular</em> emphasis

FIFY

0

u/[deleted] Oct 26 '18

[deleted]

2

u/bristleboar Oct 27 '18

Thank you for that term so I know what i hate.

15

u/rbra Oct 25 '18

Obnoxious

4

u/TrackieDaks full-smack Oct 26 '18

Yeah, a little. This is definitely one of those things that is like a little hard to explain without seeming holier-than-thou.

In the end, it's something that will benefit users with screen-readers, so it's a good idea to at least understand the point and how it works.

2

u/franksvalli Oct 26 '18

I have been hearing this sort of stuff for 10+ years and it’s getting super tiring...

2

u/venuswasaflytrap Oct 26 '18

Extremely pedantic. And if we're going to be pedantic, it's still wrong.

It advocates the use of the "i" tag for things like "thoughts" or using a difference voice or lots of things.

But that's not semantic. Thoughts aren't semantically italic. Thoughts are thoughts. They maybe be styled italic.

Arguably you'd do this semantically:

<span class="thought">Being anal about semantic tags seems like a lot of pointless effort</span>, she thought.

Or indeed

<em class="thought">A thought is an emphasized thing in text isn't it?</em>, he pondered

"i" and "b" are styles and have no semantic meaning, so should never be used.

Or just calm down and use what makes sense.

1

u/bristleboar Oct 27 '18

I use i and b for visual emphasis that should be ignored by a screen reader.

Which is almost never.

1

u/ddrt Oct 26 '18

Do it to <em>

1

u/bristleboar Oct 27 '18

No, I’m not. Visual emphasis is why <i> exists. I hate these articles.

1

u/[deleted] Oct 26 '18

I thought it was a good read, thank you.

-6

u/hawgfuel Oct 26 '18

And no one cares.

-2

u/[deleted] Oct 26 '18

I thought this was how everyone used it anyway...

-10

u/kingpiss9001 Oct 26 '18

does anyone actually care about this sort of thing?

I always just use <b> or <i>.

3

u/wackrtist Oct 26 '18

That’s blasphemous!

2

u/[deleted] Oct 26 '18

People using screen readers care. As does Google

1

u/bristleboar Oct 27 '18

buzzzzzzzzzz