What's the difference between and , and ?

前端 未结 22 2073
清酒与你
清酒与你 2020-11-22 08:10

What\'s the difference between and , and in HTML/XHTML? When should you use

22条回答
  •  深忆病人
    2020-11-22 08:50

    I use both and , actually, for exactly the reasons mentioned in this thread of responses. There are times when bold-facing some text simply looks better, but it isn't, necessarily, semantically more important than the rest of the sentence. Here's an example from a page I'm working on right now:

    "Retrieves all books about lacrosse."

    In that sentence, the word "all" is very important, and "lacrosse" less so--I merely wanted it bold because it represents a search term, so I wanted some visual separation. If you're viewing the page with a screen reader, I really don't think it needs to go out of the way to emphasize the word "lacrosse".

    I would tend to imagine that most web developers use one of the other, but both are fine-- is most definitely not deprecated, as some people have claimed. For me, it's just a fine line between visual appeal and meaning.

提交回复
热议问题