Is it correct to use single quotes for HTML attributes?

前端 未结 15 2665
没有蜡笔的小新
没有蜡笔的小新 2020-12-01 05:57

Recently I\'ve been seeing a lot of this:


    

        
15条回答
  •  南方客
    南方客 (楼主)
    2020-12-01 06:41

    What's against single quotes?

    You can have single/double quotes all over your html code without any problem, as long as you keep the same quoting style inside a current tags ( many browser won't complain even about this, and validation just want that if you start with a quote, end with the same, inside the same propriety )

    Free support to random quoting styles!!! (yay ;D )

提交回复
热议问题