Space Before Closing Slash?

后端 未结 8 1834
说谎
说谎 2020-11-27 15:29

I\'ve frequently seen a space preceding the closing slash in XML and HTML tags. The XHTML line break is probably the canonical example:


<
8条回答
  •  时光说笑
    2020-11-27 16:02

    The space just makes the tags more readable. I am a big proponent of formatting for more readable code. Little things like that go a long way. Without the space the closing tag blends in with the opening tag. It takes just an instant longer for me to process it as I am quickly reading the code.

提交回复
热议问题