HTML 5: Is it
,
, or
?

后端 未结 29 3298
滥情空心
滥情空心 2020-11-22 00:26

I\'ve tried checking other answers, but I\'m still confused — especially after seeing W3schools HTML 5 reference.

I thought HTML 4.01 was supposed to \"allow\" singl

29条回答
  •  情话喂你
    2020-11-22 00:34


    and
    render differently in some browsers, so choosing either over the other isn't going to hurt your project, but do expect a bulk find..replace to affect the page render in some browsers, which may result in extra work for yourself or even embarrassment should the change affect nothing in your test browser, but break it in the preferred browser of your clients'.

    I prefer
    since it is what I have used since Erwise and Netscape Navigator (early web browsers), but there's no reason not to choose
    instead. It may be useful for some preprocessing, comparability, etc.

    Even if your choice boils down to preferring the look of one over the other, or you (or your favourite HTML editor e.g. Dreamweaver) might like your code to be xml compliant. It's up to you.

    A quick side note:

    Not to be confused with br, but in addition you may also consider using wbr tags in your HTML: A word break opportunity tag, which specifies where in a text it would be ok to add a line-break.

    For further reading, please have a read of the HTML5 spec.

提交回复
热议问题