單引號 vs 雙引號 (' vs ") - Single vs Double quotes (' vs ")

問題:

I've always used single quotes when writing my HTML by hand.在手動編寫 HTML 時,我總是使用單引號。 I work with a lot of rendered HTML which always uses double quotes.我使用了很多渲染的 HTML,它們總是使用雙引號。 This allows me to determine if the HTML was written by hand or generated.這使我能夠確定 HTML 是手工編寫還是生成的。 Is this a good idea?這是一個好主意嗎?

What is the difference between the two?兩者有什麼區別? I know they both work and are supported by all modern browsers but is there a real difference where one is actually better than the other in different situations?我知道它們都可以工作並且受到所有現代瀏覽器的支持,但是在不同情況下一個實際上比另一個更好的真正區別是否存在?


解決方案:

參考一: https://en.stackoom.com/question/9xLO
參考二: https://stackoom.com/question/9xLO
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章