Why is the deprecated?

后端 未结 7 880
生来不讨喜
生来不讨喜 2021-02-04 23:34

I understand that this tag could easily be replaced with and a little bit of CSS, but in real life markup I often find that <

7条回答
  •  旧巷少年郎
    2021-02-05 00:19

    The proper way to achieve what you want is to declare that "V. V. Putin" is a proper noun, and define in CSS that such a proper noun should not be line breaked.

    V. V. Putin
    

    and in CSS you would define

    .propernoun {
      white-space: nowrap;
    }
    

    Since... HTML is not about style, it is about content. Basically, this is the same as what the OP suggested, but the nowrap in class="nowrap" describes a presentational property in html which should be in the stylesheet.

提交回复
热议问题