3 ms·
Use the font-weight as suggested. HTML should be used to structure and semantics, not to define content's appearance. HTML can be converted into audio for bli
by nabla9 2y ago
Use the font-weight as suggested.
HTML should be used to structure and semantics, not to define content's appearance.
HTML can be converted into audio for blind people, used trough text terminal, used in many ways we don't expect.
- legitster 2y agoThe suggested replacements, <em> and <strong>, also define content's appearance and already have robust screen readers support. There's no practical reason <b> needs to be any different.
- nabla9 2y agoexcept semantics.
- deleted 2y ago[deleted]
- thayne 2y agoSuppose you want to bold something for stylistic reasons. <strong> isn't right, because the boldness isn't really for a strong emphasis, and you don't really want a screen reader to treat it differently. You could use <span class="bold"> or <span style="font-face: bold;">, but that's just a more verbose version of <b>.
- nabla9 2y ago> Suppose you want to bold something for stylistic reasons. The whole point of the article is that you should use css for style and html for structure and semantics. Don't use markup for style. Have separate css file for that. If you don't care or understand why that makes sense, just use bold.
- thayne 2y agoBut it is unavoidable to have to use markup for style. You have to use some markup to indicate the span that needs to be bold. Yes, you could use a <span> instead, but that is still using html for style, and conveys less about the purpose of the tag.