HTML 5: Is it
,
, or
?

后端 未结 29 3300
滥情空心
滥情空心 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:52

    In HTML (up to HTML 4): use

    In HTML 5:
    is preferred, but
    and
    is also acceptable

    In XHTML:
    is preferred. Can also use
    or

    Notes:



    • is not valid in HTML 5, it will be thought of as two line breaks.
    • XHTML is case sensitive, HTML is not case sensitive.
    • For backward compatibility, some old browsers would parse XHTML as HTML and fail on
      but not

    Reference:

    • http://www.w3schools.com/tags/tag_br.asp
    • http://en.wikipedia.org/wiki/XHTML

提交回复
热议问题