Are overlapping HTML formatting tags always a bad practice?

前端 未结 2 791
天涯浪人
天涯浪人 2021-01-23 03:35

Suppose I need to have a text with a bold and an italic part that overlap each other, like you see this sentence have.

Now, I know the proper w

2条回答
  •  臣服心动
    2021-01-23 04:21

    Combining i and b is totally fine, however, you need to make sure to nest them correctly.

    Wrong:

    I want this text to have both bold and italic
    

    Right: (depending on what you want to achieve, of course)

    I want this text to have both bold and italic
    

提交回复
热议问题