DEV Community

Ken S
Ken S

Posted on

1 1

Devs: Single Quotes or Double Quotes on Attribute Values?

I typically use single quotes in my code and reserve double quotes for literal strings.

I'm in the middle of a HTML Certification course through W3 Schools and all of the examples have double quotes. The best practice section only states that HTML Attributes should be quoted and only uses double quotes in the examples.

For current Devs who work on the front end, do you find there is any preference?

Note: This is more for curiosity. I'm going to go with double quotes for the W3 course since that's what they recommend.

Top comments (0)

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay